Re: [PATCH] x86/pkeys: Explicitly treat PK #PF on kernel address as a bad area

From: Andy Lutomirski
Date: Wed Sep 05 2018 - 17:39:46 EST


On Wed, Sep 5, 2018 at 2:35 PM, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
> On 09/04/2018 02:27 PM, Andy Lutomirski wrote:
>> Also, I doubt it matters right here, but !X86_PF_USER isn't quite the
>> same thing as "originating from kernel code" -- it can also be user
>> code that does a CPL0 access due to exception delivery or access to a
>> descriptor table. Which you saw plenty of times while debugging
>> PTI... :) I doubt any of those should be spurious, though.
>
> Yeah, you're talking about "implicit supervisor access". Right?

Yes.