Project 7 - Extra Credit Project

In this project, you are tasked with implementing a simple kernel module that will allow you to add a new system call in the kernel.
Learning Objectives
- 2.2 Explore the system call interface
- 2.3 Show an understanding of the difference between user and kernel space
Grading Rubric
Make sure and review the class grading rubric so you know how your project will be graded.
Overview
This Project is extra credit and can be used to replace a missed project or boost your grade. You will need to attend office hours to get help with the project.
AWS released a new hypervisor in called Nitro that allows us to run our own kernel modules and debug issues pre-boot, this was something that was not possible just a few years ago so we will be on the cutting edge of technology! This is a fantastic opportunity to learn how to leverage the cloud to do some low-level debugging!
Building the Kernel
Here are the steps to build and install the kernel to make sure everything is working correctly. These instructions are for Fedora 38+.
Install all the required dependencies and build tools as described in the minimal build instructions in the kernel README. These tools will be in different packages depending on your distribution. For Fedora, you can run the following command:
bashsudo dnf install -y gcc make flex bison elfutils-libelf-devel openssl-devel bc llvm clang lld openssl openssl-devel dwarvesMake a new directory to build clone the kernel source
bashmkdir -p ~/kernel && cd ~/kernelClone Linus's tree from git.kernel.org
bashgit clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gitGenerate a default configuration file from your local kernel configuration so you can build the kernel and required modules.
bashmake localmodconfig