Re: [RFC][PATCH 2/8] x86/mm: break out kernel address space handling
From: Dave Hansen
Date: Fri Sep 07 2018 - 18:38:02 EST
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.