Kernel Module (lkm.ko)

April 1, 2026 ยท View on GitHub

This directory builds the out-of-tree kernel module used by the lab.

Build

From repo root:

make -C module PROFILE=ubuntu all

or for VM/local kernel profile:

make -C module PROFILE=6.12.66 all

or for kernelCTF profiles:

make -C module PROFILE=kernelctf-6.12 all
make -C module PROFILE=kernelctf-6.6 all
make -C module PROFILE=kernelctf-6.1 all

Valid Profiles

6.12.66, ubuntu, ubuntu-old, fedora, rasp, kernelctf-6.1, kernelctf-6.6, kernelctf-6.12

kernelCTF Notes

  • For kernelctf-* profiles, the Makefile uses kernel sources under ../kernelctf/linux-*.
  • You can override the detected tree with:
make -C module PROFILE=kernelctf-6.12 KERNEL_CTF_KDIR=/path/to/kernel/tree module
  • BTF sections are stripped from lkm.ko after kernelCTF builds to avoid load failures on minimal kernels.

Push to Shared Directory

make -C module PROFILE=kernelctf-6.12 all push

This copies lkm.ko to:

../vmshare/module/lkm.ko