Exception Table done!
Finally, bad userspace pointers don’t bring down the kernel anymore.
What the Exception Table does
Only a few instructions in a few places in kernel code can actually produce a pagefault which is the user’s fault, not the kernel’s. If we handle those normally, we’d panic. The exception table however gets built at compile time and contains every place in the kernel that could produce userspace-caused page faults. We simply check if the page fault happened at one of these instructions, and if it did, skip the instruction and return a BadAddress error instead.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.