Re: [RFC][PATCH 3/8] x86/mm: break out user address space handling

From: Dave Hansen
Date: Mon Sep 10 2018 - 16:20:26 EST


On 09/08/2018 02:38 AM, Peter Zijlstra wrote:
>> + /* Was the fault on kernel-controlled part of the address space? */
>> + if (unlikely(fault_in_kernel_space(address)))
>> + do_kern_addr_space_fault(regs, hw_error_code, address);
>> + else
>> + do_user_addr_space_fault(regs, hw_error_code, address);
>> +}
> How about: do_{user,kernel}_fault() ? That _addr_space_ is just a lot of
> typing for no real benefit imo.

Yeah, totally, the names are long.

I was just trying to make it obvious to differentiate address space from
*mode* when the fault occurred. I can probably do that in comments
instead, though.