August 2022
Intermediate to advanced
638 pages
13h 58m
English
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, ...