Submission Instructions

To submit your work, you’ll use email!

Sending emails is the standard way for maintainers and users to contribute to the Linux kernel.

For this course, you will not send emails directly to the Linux Kernel Mailing List (LKML) but to our email address lkp-maintainers@os.rwth-aachen.de. We will apply your patches to the kernel sources, compile, and run the kernel in a VM. Some tests will be executed and depending on their output, your submission will be validated or not. All of which is automated.

Submission information

For each task, we will specify if it has to be submitted in a box like this one.

Tasks are classified into three categories:

  • Admission: the task must be submitted and the tests must succeed in order to register for the exam.
  • Grade: the task counts towards the 10% of the final grade for labs, but is not mandatory to register for the exam.
  • Others: tasks with no submission information box should not be submitted, as they will not trigger any automated test.


Sending emails using git

Configuring git

First, start by configuring git to send emails using your RWTH email address. You can find instructions here: git-send-email.

To setup RWTH’s SMTP server, use the following configuration file and change ab123456 to your TIM ID.

[sendemail]
    smtpserver = mail.rwth-aachen.de
    smtpuser = ab123456@rwth-aachen.de
    smtpencryption = tls
    smtpserverport = 587

Then, you can set your RWTH email credentials with:

git config --global user.email "your.name@rwth-aachen.de"
git config --global user.name "Your Name"
git config --global sendemail.smtpPass 'your password'
Warning

Always use your @rwth-aachen.de email address! Emails from another domain will be ignored.

Sending patches

Once git is setup, you can send your first patches by email with git send-email:

git send-email --to lkp-maintainers@os.rwth-aachen.de your_patches.patch

You can manually generate your patches as shown in the lecture using diff. However, we strongly advise you to check out how git format-patch works and use it.

As an example, let’s go through the submission of lab 3 task 1. We will assume you are using git, and have the following commits on top of Linux 6.5.7:

2503386 (HEAD -> mybranch, origin/mybranch) allow users to change parameter values
bd397fc add hello_world_param code
9889dc3 add hello_world code

We can use git format-patch to generate the patch series for the last three commits:

$ git format-patch HEAD~3
0001-add-hello_world-code.patch
0002-add-hello_world_param-code.patch
0003-allow-users-to-change-parameter-values.patch

We can then submit these patches by email with git send-email:

git send-email --to lkp-maintainers@os.rwth-aachen.de 0001-add-hello_world-code.patch 0002-add-hello_world_param-code.patch 0003-allow-users-to-change-parameter-values.patch

In order to trigger the proper tests on our side, you also need to modify the Subject of the first email of your patch series. You must prefix the subject with the following string: lab<lab nr>: task<task nr>: <email subject>. In our example, we would change the subject from

Subject: [PATCH 1/3] add hello_world code

to

Subject: [PATCH 1/3] lab3: task1: add hello_world code

This also means that you need to submit a patch series for each task that needs to be evaluated.

Warning

Before sending an email, double check these two lines for each email:

To: lkp-maintainers@os.rwth-aachen.de
Cc: Max Mustermann <max.mustermann@rwth-aachen.de>

Ensure you are sending the email only to your account and our specified address.

Check who you are sending your patches to!

Never send a patch/commit that is not written by you. It will CC the original author of the patch and you will be spamming Linux maintainers.


Build your module in-tree

Since we are emulating the real submission process of the Linux kernel, we need to work in the kernel tree. Our submission platform does not support out-of-tree kernel modules.

The rest of this section describes how to add in-tree modules, so that the submission platform automatically builds the modules located inside the kernel sources from your patches.

Start by creating an lkp/ directory at the root of the kernel sources and put your C files inside. For instance, if you are developing the module associated with uname, your Linux source tree should contain this:

lkp/
    uname.c
    Makefile

You need to tell the kernel Makefile which directories to compile. For that, modify the Kbuild file at the root of the kernel sources to add the newly created directory:

obj-y           += lkp/

Inside the lkp/ directory, add your files and add a new Makefile with the following rules, matching the proper file names:

obj-m           += helloWorld.o
obj-m           += uname.o
...

Check that everything is working by compiling:

make lkp/   # check that the modules compile
make        # check that our lkp/ directory in included in the kernel makefile

Finally, don’t forget to add the modifications made to the Makefile in your patch set before sending the email. Otherwise, the automated submission platform won’t be able to compile your modules.

Warning

The modules need to have the exact same name as specified in the lab assignment! If you are asked to write a uname module, we expect to find a uname.ko file after building everything.

Back to top