lkml.org 
[lkml]   [2018]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/9] x86, pkeys: do not special case protection key 0
From
Date
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.

\
 
 \ /
  Last update: 2018-03-26 19:39    [W:0.091 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site