Linux Foundation Kernel Mentorship Program – My Experience
[kernel
linux
software-development
learning
]
The Linux Foundation (LFX) offers a three-month Mentorship Program where participants engage in hands-on bug fixing on the Linux Kernel project while receiving support from maintainers, tutors, and past or current mentees.
When I first applied for the LFX mentorship program, even though I received the PhD in Computer Engineering and I’m teaching Operating Systems at the University of Bologna, I was a novice both as an Open Source contributor and in Linux Kernel development, and I had no idea how this experience would impact my professional growth.
I think the OSS ecosystem is particularly interesting and strategic for my professional growth and for the future of IT. Since my main goals are to continue to learn and stay up to date with new technology and trends. Being involved and contributing to interesting projects and participating actively in OSS is key to improving professionally, finding brilliant people, sharing knowledge, and making an impact. To do that, I believe it’s crucial to have the right mentorship and learn from experienced OSS contributors who can share the right approach and guide you in the wide OSS ecosystem.
All the reasons above make me glad to participate in the LFX Mentorship Program.
How to participate
The participation in the program is quite easy and straightforward from the bureaucratic point of view but requires technical efforts.
In order to be considered, go to the LFX mentorship page, browse the “Linux Kernel Bug Fixing (full-time only) Unpaid”, and click on “Apply”. That’s it.
Then, the fun starts. You’ll receive a list of tasks to do within certain deadlines. The tasks are related to the main prerequisites you should have in order to be able to complete the mentorship program and involve the main basic activities you can deal with regarding the Kernel, such as:
- Learn how kselftest works and compile tests
- Build and boot Linus’s latest tree
- Add Command Line Arguments to a Module
- Research how to find PCI and USB devices on your system
- Add an extra version field and boot that kernel and send patch
- Research how kernel documentation is generated
- Write a “hello world” kernel module
- Learn to use scripts/decode_stacktrace.sh to analyze stack traces
Note that all these prerequisites are included in the Linux Kernel course A Beginners Guide to Linux Kernel Development LFC103 and are key to understanding quickly the main concepts and being able to start to play with those tasks.
When you finish all the tasks you can wait for the acceptance email.
Please refer to the Mentorship Guide for detailed mentorship process.
Hint: note that it seems a lot of people are interested in the Linux Kernel Mentorship Program and only a few seats are available; in fact, the acceptance email included the sentence
..thus spend time to improve your tasks’ output as much as possible and try to send some patches since the very beginning.
Challenges and where to start
Like any new experience, there were challenges along the way. Familiarizing with such a large and complex codebase is hard. Analyzing documentation about tools, subsystems, components, tests, and so on took a lot of time and effort, especially at first. Initially, it’s easy to feel overwhelmed by the amount of things to read, understand, and put into practice, especially because a lot of them are not related to the code itself but, for example, on how to communicate with maintainers, how to manage patches, how to run a test, how to configure the test environment, and so forth. At times you can doubt the possibility of contributing to such a complex project since you don’t understand how things work.
Expecially in the first period, when you feel a bit lost, but along all the Program duration is crucial to engage with mentors, fellow mentees, and the Linux kernel community in order to receive support and guidance at various level. Mentors are invaluable source of experience to understand where to focus on, i.e. on which tutorials, guids and tools, and help you when you’re stuck. Fellow mentees may help to solve basic doubts, give another perspective on the problem, help to tests something, or even anticipate questions that later you’ll raise to yourself. Finally, in the Linux kernel community it’s possibile to find the expert subject matter.
Moreover, it’s key to start with small and easier tasks to improve knowledge and confidence on the requested activities.
So, for newbies, probably the best way is to start from static analysis tools
, since they provide simple code modifications that usually do not change the code flaw and are much easier to fix than runtime bugs. In my case, I started from:
Checkpatch, a script that checks for “cosmetic” improvements like trivial style violations in files. These types of errors are just a very first introduction to the code, and usually my suggestion is to not send a patch to avoid wasting maintainers’ time.
Coccinelle, a tool for pattern matching and text transformation. For more details, check this post. With Coccinelle, be careful when sending patches because it often finds false positives, so check the code and the patch carefully before sending them.
Sparse, a semantic checker for C programs. For more details, check this post. With Sparse, be careful to select the right errors and warnings to fix because some of them are not really straightforward to modify and require non-trivial modifications, which may not be necessary for a small warning.
Smatch, a static analysis tool. For more details check this post. Even for Smatch, be careful to select the right issue to fix to avoid false positives.
After some static analisys bugs are solved, maybe one for each tool, you can move to runtime issues that are more challenging, require building a test environment to reproduce them, and demand previous knowledge of the code they are impacting.
The main source of dynamic analysis
bugs is the Syzbot fuzzer.
Read this post for more details about environment configuration and runtime bug analysis.
Finally, explore other Kernel areas like kselftest, documentation and drivers and check if they raise some issues and in that case try to fix it.
This was my learning path during the Menthorship Program and, looking back now, I can confidently say my journey within the LFX program has been transformative, teaching me the power of perseverance and learning which allow me to start as newby and be able to fix mroe than 7 bugs in a tight amount of time and in an extrimely complex project like the Linux Kernel.
Menthorship benefits
The main reasons and benefits I suggest to partecipate in the LFX Menthorship Program and, in particular, in the Linux Kernel Bug Fixing Program are:
- Project Popularity. LFX Mentorship covers a wide range of open source projects, allowing participants to choose projects aligned with their interests and expertise. The Linux Kernel is one the most notable IT project you can deal with.
- Collaboration and support. The program facilitates meaningful collaboration between mentors and mentees, with Discord channel for real-time chat and weekly class, and providing on-demand support in case of blocking issues.
- Impact. Participants actively contribute to real-world use-cases and popular sub-systems, making changes on piece of software used in Linux Kernel distributions that may impact a huge number of devices.
- Community Engagement. In general, LFX Mentorship Programs encourages community engagement, allowing participants to get in touch with maintainers and introduce as members of the open source ecosystem. Moreover you will be invited to the LFX Mentorship Showcases which will be held at Open Source Summits at various locations during the next year.
What’s next
Being a mentee in the LFX Mentorship Program has been a significant experience. Through this program, I had the opportunity to work on the Linux Kernel, a project that always fashinated me because it’s a piece of software that is the bedrock of the whole IT. This mentorship gave me hands-on experience and invaluable insights into contributing to large-scale, real-world subsystems.
As I conclude my time in the LFX Mentorship program, I feel prepared to continue contributing to the Linux Kernel. Skills and knowledge I gained during this experience will no doubt influence my future contributions, and I’m determined to remain part of the open-source community.
I encourage anyone interested in open-source development, to apply for the LFX Mentorship Program. Whether you are just starting or have prior experience, the mentorship will help you grow as a developer and contribute meaningfully to important projects.