From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [PATCH v14 09/19] x86/mm: x86/sgx: Signal SEGV_SGXERR for #PFs w/ PF_SGX To: Jethro Beekman , Sean Christopherson CC: Jarkko Sakkinen , Andy Lutomirski , Andrew Lutomirski , X86 ML , Platform Driver , "nhorman@redhat.com" , "npmccallum@redhat.com" , "Ayoun, Serge" , "shay.katz-zamir@intel.com" , "linux-sgx@vger.kernel.org" , Andy Shevchenko , Dave Hansen , Peter Zijlstra , "Thomas Gleixner" , Ingo Molnar , "Borislav Petkov" , "H. Peter Anvin" References: <20180926173516.GA10920@linux.intel.com> <2D60780F-ADB4-48A4-AB74-15683493D369@amacapital.net> <9835e288-ba98-2f9e-ac73-504db9512bb9@intel.com> <20180926204400.GA11446@linux.intel.com> <992b1d6d-cc0f-776f-d938-2a1f7cad52c8@intel.com> <20180927135603.GF8242@linux.intel.com> <2e7b81e1-818f-7d76-e2b4-793d9ec5d5a6@intel.com> <20181031213036.GA23089@linux.intel.com> From: Dave Hansen Message-ID: Date: Wed, 31 Oct 2018 14:58:49 -0700 In-Reply-To: Content-Type: text/plain; charset="utf-8" Return-Path: dave.hansen@intel.com MIME-Version: 1.0 List-ID: On 10/31/18 2:53 PM, Jethro Beekman wrote: > On 2018-10-31 14:35, Dave Hansen wrote: >> On 10/31/18 2:30 PM, Sean Christopherson wrote: >>> AFAIK there isn't a way to prevent userspace from manually invoking >>> EENTER, short of doing some really nasty text poking or PTE swizzling. >>> We could declare using EENTER as unsupported, >> >> Yep, userspace can call it all it wants, and we can also say that >> calling it outside the vdso is "undefined". > > Is there a precedent for this? Are there any other ring 3 x86 > instructions that Linux is claiming to be "undefined" when executed by a > user process? We did it for MPX. "Don't use MPX unless you first tell the kernel, or we'll eat your puppy."