On 09/07/2018 03:21 PM, Andy Lutomirski wrote: >> +static void >> +do_kern_addr_space_fault(struct pt_regs *regs, unsigned long hw_error_code, >> + unsigned long address) >> +{ > > Can you add a comment above this documenting *when* it’s called? Is > it all faults, !user_mode faults, or !PF_USER?
Yep, can do. >> + /* >> + * This is a "bad" fault in the kernel address space. There >> + * is no reasonable explanation for it. We will either kill >> + * the process for making a bad access, or oops the kernel. >> + */ > > Or call an extable handler? > > Maybe the wording should be less scary, e.g. “this fault is a genuine > error. Send a signal, call an exception handler, or oops, as > appropriate.” Yeah, the real behavior is quite a bit more subtle than I'm letting on. I'll tone it down.