lkml.org 
[lkml]   [2018]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/pkeys: Explicitly treat PK #PF on kernel address as a bad area
From
Date
On 08/30/2018 03:40 AM, Thomas Gleixner wrote:
> Given the time span you should be close to ground water with your digging
> by now.

So, turns out that we start our spurious_fault() code with this check:

> if (error_code != (X86_PF_WRITE | X86_PF_PROT) &&
> error_code != (X86_PF_INSTR | X86_PF_PROT))
> return 0;

Which ensures that we only do spurious checking for *very* specific
error_code's. That ends up making the X86_PF_PK check inside of
spurious_fault_check() dead code _anyway_. It's totally unreachable as
far as I can tell.

We could add a comment above the error_code check to make it explicit
that it excludes pkeys.

But, otherwise, I think we can just axe the X86_PF_PK
spurious_fault_check().

\
 
 \ /
  Last update: 2018-08-31 01:35    [W:0.029 / U:12.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site