You are here: Home » Study Plan » Subject


Subject: KERNEL HACKING (A.A. 2023/2024)

master degree course in COMPUTER SCIENCE

Course year 2
Teaching units Unit Kernel hacking
Information Technology (lesson)
  • TAF: Compulsory subjects, characteristic of the class SSD: INF/01 CFU: 6
Teachers: Paolo VALENTE
Exam type oral
Evaluation final vote
Teaching language Italiano
Contents download pdf download




In this course you will learn how to develop code, at a professional level, within an open source operating system (Linux). In more detail, you will learn the entire development process: problem analysis, solution design, implementation, testing, profiling, code instrumentation, debugging, preparation of documentation, submission of the solution to the community, managements of the interaction with maintainers and community. During the course you will take all these steps in practice, gradually and with the constant help of the teacher. At the end of the course you will have completed the preparation of a real contribution for the community.

Admission requirements

Basic knowledge of the functioning of an operating system, better if directly of Linux. For example, the knowledge provided in the course of Operating Systems of our Bachelor's Degree is more than sufficient.

Course contents

The course proceeds on two parallel tracks
1. supply of the necessary base knowledge for developing in the kernel (theory)
and, immediately,
2. development within the Linux kernel (practice).

As for the theory, the basic steps will be the following.

- We will start with an overview of the kernel layer within which we will work: the block layer. The choice fell on the block layer because it is the part on which I'm currently most competent
- Then we will introduce the BFQ I/O scheduler, which will probably be the part we will change during the course. In particular, we will analyze BFQ starting from the algorithm and its properties, and then will move to lower and lower levels, down to the individual functions through which BFQ supplies its services to the kernel.

As for the practice, we will take the following steps, for which I will help you constantly and in every aspect.

- We will start by reviewing together the basic operations for compiling and installing a kernel
- We will learn the procedures followed by professional programmers with the git version control system
- We will make our first practical experience, through our first 'toy' kernel modification
- We will learn to perform debugging and profiling through tracing, kernel OOPS and code instrumentation
- We will learn to create quality commits and patches, including documentation, and to submit individual or group contributions to the Linux community

In particular, from around the middle of the course, the class will have become, in all respects, a small professional development team. A team that will prepare and submit individual or group contributions to the Linux community. So you will interact both directly with the teacher and with your colleagues.
Find examples of such contributions, and the time commitment they required, at the bottom of the description of the practical examination.

Teaching methods

As described in detail in the "Course Content" section, the teaching method is a true fusion of lectures and laboratory exercises. Therefore the entire course is held in a laboratory.

Assessment methods

The exam will be a natural expression of what learned in the course. It will consist of: - trying to solve a small block layer problem; - transforming your solution into a 'package' ready for distribution, that is, in preparing one or more patches containing your solution; - distributing and proposing this contribution through appropriate channels, that is, appropriately submitting your patches to the community. Providing a real contribution of this kind, however small, poses challenges: - having to deal with a greater complexity than that of an only-educational toy project; - not having a reference manual in which to find an answer to every doubt; - in all likelihood, having to ask me for help from time to time; you will have total availability on my part. Given these difficulties, no perfect work will be required to obtain the maximum mark. Finally, to get a more precise idea of the type of contributions and the time required, check the final part of the description of the examination on the course website:

Learning outcomes

At the end of the course, you will have an organic view of all the phases involved in developing production code within an open source operating system:
- problem analysis
- design of a solution
- implementation
- testing
- profiling
- code instrumentation
- debugging
- documentation
- submission of the solution to the community

Even better, you will take many of these steps in practice, while developing your own real contribution for the community.


Consultare la pagina del corso: