Logo
My Experience with Linux Kernel Bug Fixing Program

My Experience with Linux Kernel Bug Fixing Program

Published on
Authors

I participated in the Linux Kernel Bug Fixing Mentorship Program in the fall of 2024. And as the mentorship is concluding, I am putting down my thoughts about what I have learned from it.

The program began with 10 tasks which included build and running a kernel, completing LFD103 course, crashing kernel purposefully, writing a kernel module with various functionalities and so on. These tasks were due to shortlist candidates for the program. In the program, we had a dedicated Discord server for communicating with peers and mentors. I should thank Shuah Khan and Anup Sharma who were the mentors for this program. I should also thank Ricardo B. Marliere and Javier Carrasco, who were extremely helpful in resolving my doubts promptly on the channel. Apart from the Discord folks, I also interacted with Miguel Ojeda on Zulip, and a few other folks on various IRC channels (#mm and #kernelnewbies in particular). In all, I had an amazing experience and everyone involved was super nice and extremely supportive.

Coming to the actual program, we were introduced to various tools that a kernel developer may use in their day to day lives. This included cscope, syzkaller, b4 to name a few. b4 which is a command-line tool for submitting patches (it is much more than that), was my bread and butter for the past 3 months. It made my life so much easier. I could write patch series, run checkpatch.pl over it, archive submissions and do so much more. It was simply lots of fun using it and it helped me tremendously. Syzkaller is a dynamic fuzzing tool for Linux kernel (though its domain-specific language is architecture agnostic and allows it to be run for any kernel). I used it in two ways. Firstly, I ran my own local copy of syzkaller in an ubuntu virtual machine. This did gave me a bug or two to look at (after running it over for more than 4 days). And secondly, I used the syzkaller’s dashboard to visit various reported bugs, and tried to reproduce some of them on my host machine. Whenever I could successfully reproduce a crash, I would then attach a debugger to it to figure out how things were going wrong. This prompted me to submit a few patches as well whenever I could sense a fix was appropriate. For this task, I also wrote a hacky script, which could automate this process. This made my work a lot easier. Everyday, I would pick a few bugs from the dashboard and do the work of rebuilding, reproducing and finally submitting a patch. As I was writing my final report for submission, I checked my browser history to find that I almost looked at over 130+ bugs in the span of 3 months.

In summary, I contributed a total of 11 patches out of which 7 are either in mainline or are going to be soon. I had an awesome experience in this mentorship and I can definitely see myself becoming a permanent contributor to the Linux kernel. And I would definitely encourage aspiring kernel developers and students to check it out next year. The mentorship opens up for 3 times in an year and is mostly targeted towards newbies.

If you have any questions for me, head over to this discussion page.

PS: I have successfully graduated the program.

Graduating certificate