lkml.org 
[lkml]   [2018]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] x86, pkeys: override pkey when moving away from PROT_EXEC
On Fri, Apr 06, 2018 at 05:47:29PM -0700, Dave Hansen wrote:
> On 04/06/2018 05:09 PM, Ram Pai wrote:
> >> - /*
> >> - * Look for a protection-key-drive execute-only mapping
> >> - * which is now being given permissions that are not
> >> - * execute-only. Move it back to the default pkey.
> >> - */
> >> - if (vma_is_pkey_exec_only(vma) &&
> >> - (prot & (PROT_READ|PROT_WRITE))) {
> >> - return 0;
> >> - }
> >> +
> > Dave,
> > this can be simply:
> >
> > if ((vma_is_pkey_exec_only(vma) && (prot != PROT_EXEC))
> > return ARCH_DEFAULT_PKEY;
>
> Yes, but we're removing that code entirely. :)

Well :). my point is add this code and delete the other
code that you add later in that function.

RP



--
Ram Pai

\
 
 \ /
  Last update: 2018-04-07 03:10    [W:0.047 / U:47.848 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site