Re: [PATCH 1/9] x86, pkeys: do not special case protection key 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/26/2018 10:35 AM, Ram Pai wrote:
>>  #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
>>  	if (cpu_feature_enabled(X86_FEATURE_OSPKE)) {
>> -		/* pkey 0 is the default and always allocated */
>> +		/* pkey 0 is the default and allocated implicitly */
>>  		mm->context.pkey_allocation_map = 0x1;
> In the second patch, you introduce DEFAULT_KEY. Maybe you 
> should introduce here and express the above code as
> 
> 		mm->context.pkey_allocation_map = (0x1 << DEFAULT_KEY);
> 
> Incase your default key changes to something else, you are still good.

That's a good cleanup, but I'd rather limit _this_ set to bug fixes.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux