A Loadable Kernel Module (LKM) that prints to the kernel log. This project demonstrates the setup, compilation, and insertion of out-of-tree kernel modules.
- Language: C
- Build Tool: GNU Make (Kbuild)
- Environment: Kali Linux (Kernel 6.x)
The following system-level hurdles were cleared during development:
- Header Prep: Reinstalled and synced
linux-headers-$(uname -r). - Path Resolution: Fixed recursive build loops by utilizing absolute paths in the
M=variable. - Macro Accuracy: Debugged
__initand__exitmacro definitions to ensure proper kernel entry/exit points.
make
sudo insmod main.ko
sudo dmesg | tail