Saturday, December 8, 2007

My First Linux Kernel Patch

Those of you who know me, will know that I had a great interest to work on the Linux kernel right from engineering days. I thank my stars...I got lucky and landed up with just the right job! I get to work on the Linux kernel and also get paid for it!! Isn't that cool??

The joy of getting your first patch accepted into any Open Source project is inexplicable, especially if its the kernel itself :) I posted my first patch on 7th September, 2006. I got positive reviews from Andrew Morton and the patch was soon merged into -mm tree, followed by Linus's tree !!

The post can be found here.

Details of the patch-

I wrote a kernel module called Linux Kernel Dump Test Module (LKDTM), which would be dynamically loaded into the kernel. This module would enable testing of the various Linux kernel dumping mechanisms like kdump, mkdump, Netdump, etc. the integrity of the dump captured by each of these mechanisms needs to be tested before concluding anything about the dumping solution. It induces crashes at predefined locations and triggers the dumping mechanisms and then test the dump for correctness.

There exists a Linux Kerenl Dump Test Tool (LKDTT), which was developed to do the same kind of testing. But its functionality has some backdrops. LKDTT is split into two components: user space tool and a kernel patch. One has to rebuild the kernel to make use of LKDTT. Also, since LKDTT kernel component is based on Generic Kernel Hooks Interface, which is not in mainline, LKDTT has not been merged into the kernel. On the other hand, LKDTM, leverages the available kprobes kernel instrumentation infrastructure, to induce crash points in the running kernel. One does not even need to rebuild the kernel!

1 comment:

Aks said...

Whew! Total Greek and Latin :)