lkml.org 
[lkml]   [2016]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 30/31] x86, pkeys: create an x86 arch_calc_vm_prot_bits() for VMA flags
On Wed, 6 Jan 2016, Dave Hansen wrote:

>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> calc_vm_prot_bits() takes PROT_{READ,WRITE,EXECUTE} bits and
> turns them in to the vma->vm_flags/VM_* bits. We need to do a
> similar thing for protection keys.
>
> We take a protection key (4 bits) and encode it in to the 4
> VM_PKEY_* bits.
>
> Note: this code is not new. It was simply a part of the
> mprotect_pkey() patch in the past. I broke it out for use
> in the execute-only support.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

\
 
 \ /
  Last update: 2016-01-08 21:01    [W:0.185 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site