Linux Kernel Patches

February 2024

I’ve been using Linux since kernel version 1.2.13 in 1995, specifically S.u.S.E. Linux, as it was called back then. However, I only started contributing in 2024, almost 30 years after first using it.

I was an early Linux proponent in the 1990s and 2000s and used various distributions over the years, including SUSE, Red Hat, Debian, and Gentoo. I reinstalled them countless times on my Compaq Deskpro computer and later on my Toshiba Satellite laptop and spent hours optimizing and compiling Gentoo packages from source; and even though it seemed like a waste of time, it was fun and I learned a lot.

In 2006, I switched to a Mac because I wanted things to just work. In retrospect, this was a good time to switch and led me to become a professional iOS developer, but that’s a story for another post. Apple introduced the iPhone in 2007.

Contributing

Fast forward almost 20 years, I recently stumbled upon Greg Kroah-Hartman’s FOSDEM talk about how to write and submit your first kernel patch. Although the talk is from 2010, the process hasn’t really changed. Intrigued, I installed Debian on a virtual machine, cloned the kernel’s mainline repository, and started reading the documentation.

For the first few days, I was just fixing typos and grammatical errors and reformatting code samples. However, I started submitting patches right away to become familiar with the process. My first submitted patch can be found here.

There are many conventions and rules to follow to get your patch accepted. For example, the patch summary should be 75 characters or less. The canonical patch format Source code should not exceed 80 columns and you must use tabs. Linux kernel coding style Reading the documentation and the kernel mailing lists really helped me feel confident about my submissions. And despite its reputation, I found the community to be quite friendly and helpful.

As I was learning to navigate the kernel’s codebase using Vim and Cscope, I eventually discovered a regression bug in

kernel/trace/trace_events_synth.c

and submitted my first “real” patch. It was accepted and merged into the mainline kernel by Linus within 48 hours, and shortly thereafter, into the stable kernels 6.7.6 and 6.6.18 by Greg. Stable releases are maintained by Greg Kroah-Hartman, commonly known as Greg K-H.

Ultimately, this was an interesting learning experience for me and I’m happy to have contributed some small yet useful patches to the Linux kernel.

Hire Me

Feel free to contact me should you require assistance with the Linux kernel or kernel driver development.

See all posts