[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d0e47333-18b9-51c3-7d79-f27d6005f24f@intel.com>
Date: Thu, 27 Sep 2018 07:58:41 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc: Andy Lutomirski <luto@...capital.net>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
nhorman@...hat.com, npmccallum@...hat.com,
"Ayoun, Serge" <serge.ayoun@...el.com>, shay.katz-zamir@...el.com,
linux-sgx@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v14 09/19] x86/mm: x86/sgx: Signal SEGV_SGXERR for #PFs w/
PF_SGX
On 09/27/2018 06:42 AM, Jarkko Sakkinen wrote:
>> This flag is 1 if the exception is unrelated to paging and
>> resulted from violation of SGX-specific access-control
>> requirements. ... such a violation can occur only if there
>> is no ordinary page fault...
>>
>> This is pretty important. It means that *none* of the other
>> paging-related stuff that we're doing applies.
>>
>> We also need to clarify how this can happen. Is it through something
>> than an app does, or is it solely when the hardware does something under
>> the covers, like suspend/resume.
> When you change page permissions lets say with mprotect after the and
> try to do an invalid access according to the EPCM permissions this can
> happen.
So, there are pages that are non-executable, non-readable, or
non-writable both via the page tables and via underlying SGX
permissions. Then, we allow an mprotect() and a later access will
result in one of these SGX faults?
What permissions are these, exactly? Is it even a good idea to let that
mprotect() go through in the first place?
Either way, it sounds like we have some new conditions to spell out in
that comment.
Powered by blists - more mailing lists