You are browsing as a guest. Sign up (or log in) to start making projects!

1h 26m 34s logged

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.

0
12

Comments 0

No comments yet. Be the first!