Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 770 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 770 Bytes

Linux Kernel Module: Hello World

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.

Technical Implementation

  • Language: C
  • Build Tool: GNU Make (Kbuild)
  • Environment: Kali Linux (Kernel 6.x)

Troubleshooting Steps Taken

The following system-level hurdles were cleared during development:

  1. Header Prep: Reinstalled and synced linux-headers-$(uname -r).
  2. Path Resolution: Fixed recursive build loops by utilizing absolute paths in the M= variable.
  3. Macro Accuracy: Debugged __init and __exit macro definitions to ensure proper kernel entry/exit points.

Usage

make
sudo insmod main.ko
sudo dmesg | tail