Chapter 7: Oops! Interpreting the Kernel Bug Diagnostic
Kernel code is supposed to be perfect. It mustn't ever crash. But, of course, it does on occasion... Welcome to the real world.
When userspace code hits a (typical) bug – an invalid memory access, say – the processor's Memory Management Unit (MMU), upon failing to translate the invalid userspace virtual address to a physical one (via the process context's paging tables), raises a fault. The fault handler within the kernel then takes control. It ultimately (and typically) results in a fatal signal (often, SIGSEGV) being sent to the faulting process (or thread). This, of course, has the process possibly handle the signal and terminate.
Now take exactly the same case – except that this time, ...
Get Linux Kernel Debugging now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.