lkml.org 
[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 12/13] mmap: Add XO support for KVM XO
From
Date
On 03/10/19 23:23, Rick Edgecombe wrote:
> +
> + protection_map[4] = PAGE_EXECONLY;
> + protection_map[12] = PAGE_EXECONLY;

Can you add #defines for the bits in protection_map? Also perhaps you
can replace the p_xo/p_xr/s_xo/s_xr checks with just with "if
(pgtable_kvmxo_enabled()".

Paolo

> + /* Prefer non-pkey XO capability if available, to save a pkey */
> +
> + if (flags & MAP_PRIVATE && (p_xo != p_xr))
> + return 0;
> +
> + if (flags & MAP_SHARED && (s_xo != s_xr))
> + return 0;
>
> + pkey = execute_only_pkey(current->mm);
> + if (pkey < 0)

\
 
 \ /
  Last update: 2019-10-04 09:34    [W:0.126 / U:4.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site