The Linux Kernel Debugging intends to cover the various debugging mechanisms available int he kernel. The course begins with the basic debugging such as printing & querying. The other important concept of debugging such as analysing the crash dump is covered. Finally the other advanced mechanisms such as remote debugging, Jbrobe & Kbrobe are covered to get the solid understanding of debugging the linux kernel.
Course Objective
The Linux Kernel Debugging course attempts to introduce the various kernel debugging mechanisms in Linux
Target group:
Professionals/Students looking to diagnose & debug the kernel
Pre-requisite
Knowledge of C Programming with comfortability in Linux environment, Good understanding of Linux Device driver such as Character driver
Methology
Every theoretical topic is accompanied by corresponding hands-on/assignment to get the deep understanding of the topic.
Assessment
Assignment Based
Session 1: Debugging by printing & querying
- printk & dmesg
- proc and sysfs
- IOCTL
Exercises
- Examples involving printk() w/ dmesg
- Querying various procfs and sysfs
Session 2: Crash Dump analysis
- Oops & Panics
- Aanalysis of Pops & Panics
Exercises
- Examples generating Oops
- Capturing Oops
- Analysing Oops to debug
Session 3: Kernel Hacking Options
- Dynamically Enabling/Disabling Debug Logs
- Debugging Stack Overflow
- Debugging Lockups & Deadlocks
Exercises
Dynamically Enabling/Disabling Debug Logs
- Debugging Stack Overflow
- Debugging Lockups & Deadlocks
Session 4: Kernel Debuggers
- System call tracing
- Kernel Function Tracing
Exercises
- Playing w/ gdb
- Debugging using kdb
- Debugging using kgdb & gdb
Session 5: Tracing
- gdb Overview
- kdb Debugging
- Remote Debugging w/ kgdb
Exercises
- stracing applications
- Experimenting w/ Function Tracer
Session 5: Live Bug Fixing
- kprobe
-
jprobe & kretprobe
Exercises
- Bug fixing using kprobe / jprobe / kretprobe