From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com ([192.55.52.151]:28806 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbeKBCzt (ORCPT ); Thu, 1 Nov 2018 22:55:49 -0400 Subject: Re: [PATCH v14 09/19] x86/mm: x86/sgx: Signal SEGV_SGXERR for #PFs w/ PF_SGX To: Andy Lutomirski CC: Jethro Beekman , Sean Christopherson , Jarkko Sakkinen , 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> <2833FD27-42A0-435C-AEA5-2DC73315867A@amacapital.net> From: Dave Hansen Message-ID: <99b6de19-5620-7f3b-5c37-dbf8a6baef17@intel.com> Date: Thu, 1 Nov 2018 10:51:50 -0700 In-Reply-To: <2833FD27-42A0-435C-AEA5-2DC73315867A@amacapital.net> Content-Type: text/plain; charset="utf-8" Sender: List-ID: Return-Path: linux-sgx-owner@vger.kernel.org MIME-Version: 1.0 On 10/31/18 3:52 PM, Andy Lutomirski wrote: > I think EENTER in plain user code should have well defined semantics, > and it should get regular signals with the appropriate bits set in > the error code field in the ucontext. But we should probably > simultaneously offer a nicer API, and the libraries will use it > because it’s nicer. FWIW, if we have a signal-based version and a VDSO-based version, nobody will use the VDSO one. The Intel libraries are surely going to keep using the approach they've been using for years and I doubt their owners will be tempted even by a simpler interface to change one line of code. If we want to do the VDSO route, I think we probably need to go whole-hog and toss the signal-based one.