[RFC PATCH 2/2] arm64: Expose EPAN support via HWCAPS2_EPAN

Vladimir Murzin vladimir.murzin at arm.com
Wed Nov 18 07:43:02 EST 2020


On 11/17/20 4:59 PM, Catalin Marinas wrote:
> On Fri, Nov 13, 2020 at 03:20:23PM +0000, Vladimir Murzin wrote:
>> So user have a clue whether exec-only permissions will work.
> 
> I do think we should tell user the PROT_EXEC actually gives execute-only
> permission.

Ack.

> 
>> --- a/arch/arm64/include/uapi/asm/hwcap.h
>> +++ b/arch/arm64/include/uapi/asm/hwcap.h
>> @@ -75,5 +75,6 @@
>>  #define HWCAP2_RNG		(1 << 16)
>>  #define HWCAP2_BTI		(1 << 17)
>>  #define HWCAP2_MTE		(1 << 18)
>> +#define HWCAP2_EPAN		(1 << 19)
> 
> However, I wonder whether EPAN is meaningful to the user. PAN is a
> kernel protection that doesn't say much from a user perspective. Maybe
> something like HWCAP2_EXECONLY?

Works for me.

> 
> That said, we do have a precedent on 32-bit where we exposed HWCAP_LPAE
> to the user meaning that 64-bit atomics are available.
> 

It doesn't mean we have to follow it :)

Cheers
Vladimir



More information about the linux-arm-kernel mailing list