Sunday, July 8, 2012

Bastard Operator From Hell - Kernel Module

Recently I started getting my self used to the linux source code.
So today I thought I should simply start by writing a little "hello world" kernel module.
But as "hello world" is way too easy and simply not sufficient to test certain functionalities I decided to implement kmod_bofh (that's what I named it :)).

So what does kmod_bofh (or bofh.ko as the binary is named) do?
It creates a pseudo file /proc/excuse which when read always returns a random BOFH excuse.
Thus you can run "cat /proc/excuse" to retrieve a BOFH excuse when you need it ;-)

For those who do not know what BOFH is...
Read this: http://bofh.ntk.net/BOFH/index.php

I compiled and linked my source against the current kernel 3.5-r6 (from linus' git repository).
You can find the source code here:
http://www-user.tu-chemnitz.de/~bytow/kmod_bofh-src.tar.gz

1 comment:

  1. I also tested it with a 2.6.32 kernel under Scientific Linux 6 at our university :-)

    ReplyDelete