Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Dr. Greg
On Tue, Dec 11, 2018 at 03:10:52PM -0800, Andy Lutomirski wrote: Good evening, I hope the day has gone well for everyone. > > > > On Dec 11, 2018, at 8:52 AM, Sean Christopherson > > > > wrote: > > > > > > > > This isn't fundamentally different than forcing all EENTER > > > > calls through the

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Sean Christopherson
On Tue, Dec 11, 2018 at 03:10:52PM -0800, Andy Lutomirski wrote: > On Tue, Dec 11, 2018 at 2:23 PM Sean Christopherson > wrote: > > > > On Tue, Dec 11, 2018 at 09:58:19AM -0800, Andy Lutomirski wrote: > > > > On Dec 11, 2018, at 8:52 AM, Sean Christopherson > > > > wrote: > > > > > > > >> On Tue

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Andy Lutomirski
On Tue, Dec 11, 2018 at 2:23 PM Sean Christopherson wrote: > > On Tue, Dec 11, 2018 at 09:58:19AM -0800, Andy Lutomirski wrote: > > > On Dec 11, 2018, at 8:52 AM, Sean Christopherson > > > wrote: > > > > > >> On Tue, Dec 11, 2018 at 07:41:27AM -0800, Andy Lutomirski wrote: > > >> > > >> > >

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Sean Christopherson
On Tue, Dec 11, 2018 at 09:58:19AM -0800, Andy Lutomirski wrote: > > On Dec 11, 2018, at 8:52 AM, Sean Christopherson > > wrote: > > > >> On Tue, Dec 11, 2018 at 07:41:27AM -0800, Andy Lutomirski wrote: > >> > >> > On Dec 10, 2018, at 3:24 PM, Josh Triplett wrote: > > On Mon, Dec

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Sean Christopherson
On Tue, Dec 11, 2018 at 09:58:19AM -0800, Andy Lutomirski wrote: > > On Dec 11, 2018, at 8:52 AM, Sean Christopherson > > wrote: > > > >> On Tue, Dec 11, 2018 at 07:41:27AM -0800, Andy Lutomirski wrote: > >> > >> > On Dec 10, 2018, at 3:24 PM, Josh Triplett wrote: > > On Mon, Dec

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Andy Lutomirski
> On Dec 11, 2018, at 8:52 AM, Sean Christopherson > wrote: > >> On Tue, Dec 11, 2018 at 07:41:27AM -0800, Andy Lutomirski wrote: >> >> On Dec 10, 2018, at 3:24 PM, Josh Triplett wrote: On Mon, Dec 10, 2018 at 03:21:37PM -0800, Sean Christopherson wrote: At that point I reali

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Sean Christopherson
On Tue, Dec 11, 2018 at 07:41:27AM -0800, Andy Lutomirski wrote: > > > > On Dec 10, 2018, at 3:24 PM, Josh Triplett wrote: > > > >> On Mon, Dec 10, 2018 at 03:21:37PM -0800, Sean Christopherson wrote: > >> At that point I realized it's a hell of a lot easier to simply provide > >> an IOCTL via

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Andy Lutomirski
> On Dec 10, 2018, at 3:24 PM, Josh Triplett wrote: > >> On Mon, Dec 10, 2018 at 03:21:37PM -0800, Sean Christopherson wrote: >> At that point I realized it's a hell of a lot easier to simply provide >> an IOCTL via /dev/sgx that allows userspace to register a per-process >> ENCLU exception ha

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Sean Christopherson
On Tue, Dec 11, 2018 at 08:53:39AM -0600, Dr. Greg wrote: > On Mon, Dec 10, 2018 at 03:24:50PM -0800, Josh Triplett wrote: > > Good morning to everyone, I hope the week is progressing well. > > > On Mon, Dec 10, 2018 at 03:21:37PM -0800, Sean Christopherson wrote: > > > At that point I realized i

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-11 Thread Dr. Greg
On Mon, Dec 10, 2018 at 03:24:50PM -0800, Josh Triplett wrote: Good morning to everyone, I hope the week is progressing well. > On Mon, Dec 10, 2018 at 03:21:37PM -0800, Sean Christopherson wrote: > > At that point I realized it's a hell of a lot easier to simply provide > > an IOCTL via /dev/sgx

Re: [RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-10 Thread Josh Triplett
On Mon, Dec 10, 2018 at 03:21:37PM -0800, Sean Christopherson wrote: > At that point I realized it's a hell of a lot easier to simply provide > an IOCTL via /dev/sgx that allows userspace to register a per-process > ENCLU exception handler. At a high level, the basic idea is the same > as the vDSO

[RFC PATCH v3 0/4] x86: Add exception fixup for SGX ENCLU

2018-12-10 Thread Sean Christopherson
This is effectively v3 of the "x86: Add vDSO exception fixup for SGX" series, but as you might of noticed, there are no vDSO changes here. Andy's comment on Spectre/retpoline[1] and Jethro's comment on making the vDSO as barebones as possible[2] got me wondering if we could let userspace dynamical