Summary
Awesome! Great job on completing this really important chapter!
Here, you first learned what a kernel Oops is. You can perhaps think of it as the equivalent to a user-mode segfault, but as it's the kernel that's buggy, all guarantees are off. We began by showing you how to generate a simple NULL pointer dereference bug, triggering an Oops (though it may sound silly and obvious, these bugs still do occur – the last portion of this chapter points you to some actual Oopses, some of which are NULL pointer dereference bugs). We then went a bit further, triggering bugs in the NULL trap page and then in a random sparse region of kernel VAS (recall the useful procmap
utility, which allows you to see the entire memory map of any process). Still further, more realistically, we used the kernel's default events
workqueue to have a kernel worker thread illegally access an invalid pointer, causing an Oops (case 3)! We used this as a useful test case throughout the...