DEV Community

Izabela Bakollari
Izabela Bakollari

Posted on

My journey in the Linux kernel world!

I have recently graduated from my Linux Kernel Mentorship program and it has been the most life-changing experience. I started my journey in the Linux kernel development with little knowledge. I got in touch with my mentor and started exploring the dropwatch utility. Gradually I got familiar with it and started working on the first steps of the project.

Dropwatch is a utility that monitors dropped frames by having userspace record them over the dropwatch protocol over a file. The goal of the project was to augment this kernel feature to create a dummy network interface for the purpose of cloning and queuing packets which otherwise would have been dropped by the kernel.

During my mentorship, I have learned in-depth about serialization, concurrency, and recursion.

  • Serialization

This has been the most important lesson during the mentorship. I created a pair of spinlocks with the purpose of protecting the dummy network interface while the user was checking its value, acting on it, or setting a new value. In the case of concurrency and recursion, that would cause deadlocks. One thing I noticed, was to make sure spinlocks were being correctly used to protect the shared data structures everywhere it is used.

These were my main challenges during the mentorship:

  • Concurrency

There were cases where the dummy network interface was being accessed by another process or thread of execution and the users want only one process to access it at a time. One example is that the user would want to disable dummy module (rmmod).

  • Recursion

A network packet gets dropped somewhere in the network stack and it calls trace_drop_common() to record tit. With the augmented code, netif_receive_skb() is called, which causes the skb to get dropped, causing trace_drop_common() to get called again.

Making progress every week is what keeps me motivated. The kernel community was helpful and responsive to my patches. Their reviews have offered me a different perspective and helped find new solutions to the problems I faced. I am planning to continue learning and contributing to the Linux kernel and be active in the community.

I want to thank everyone who is supporting and guiding me on this journey!

Top comments (0)