Re: [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-25 Thread Jarkko Sakkinen
On Fri, Nov 17, 2017 at 03:07:05PM -0800, Darren Hart wrote: > No incremental cleanup here - appears to all be handled through > sgx_le_stop - do I have that right? Yes. This is correct. /Jarkko

Re: [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-25 Thread Jarkko Sakkinen
On Fri, Nov 17, 2017 at 03:07:05PM -0800, Darren Hart wrote: > No incremental cleanup here - appears to all be handled through > sgx_le_stop - do I have that right? Yes. This is correct. /Jarkko

Re: [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-25 Thread Jarkko Sakkinen
On Fri, Nov 17, 2017 at 03:07:05PM -0800, Darren Hart wrote: > On Mon, Nov 13, 2017 at 09:45:27PM +0200, Jarkko Sakkinen wrote: > > Glue code for hosting in-kernel Launch Enclave (LE) by using the user > > space helper framework. > > > > Tokens for launching enclaves are generated with by the

Re: [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-25 Thread Jarkko Sakkinen
On Fri, Nov 17, 2017 at 03:07:05PM -0800, Darren Hart wrote: > On Mon, Nov 13, 2017 at 09:45:27PM +0200, Jarkko Sakkinen wrote: > > Glue code for hosting in-kernel Launch Enclave (LE) by using the user > > space helper framework. > > > > Tokens for launching enclaves are generated with by the

Re: [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-17 Thread Darren Hart
On Mon, Nov 13, 2017 at 09:45:27PM +0200, Jarkko Sakkinen wrote: > Glue code for hosting in-kernel Launch Enclave (LE) by using the user > space helper framework. > > Tokens for launching enclaves are generated with by the following > protocol: > > 1. The driver sends a SIGSTRUCT blob to the LE

Re: [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-17 Thread Darren Hart
On Mon, Nov 13, 2017 at 09:45:27PM +0200, Jarkko Sakkinen wrote: > Glue code for hosting in-kernel Launch Enclave (LE) by using the user > space helper framework. > > Tokens for launching enclaves are generated with by the following > protocol: > > 1. The driver sends a SIGSTRUCT blob to the LE

Re: [intel-sgx-kernel-dev] [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-15 Thread Jarkko Sakkinen
On Tue, Nov 14, 2017 at 10:31:15PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 14, 2017 at 10:16:43AM -0800, Sean Christopherson wrote: > > This semaphore approach is broken due to the LE process using an anon inode > > for > > /dev/sgx, which results in sgx_release being called without an

Re: [intel-sgx-kernel-dev] [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-15 Thread Jarkko Sakkinen
On Tue, Nov 14, 2017 at 10:31:15PM +0200, Jarkko Sakkinen wrote: > On Tue, Nov 14, 2017 at 10:16:43AM -0800, Sean Christopherson wrote: > > This semaphore approach is broken due to the LE process using an anon inode > > for > > /dev/sgx, which results in sgx_release being called without an

Re: [intel-sgx-kernel-dev] [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-14 Thread Jarkko Sakkinen
On Tue, Nov 14, 2017 at 10:16:43AM -0800, Sean Christopherson wrote: > This semaphore approach is broken due to the LE process using an anon inode > for > /dev/sgx, which results in sgx_release being called without an accompanying > call > to sgx_open.  This causes deadlocks due to a semaphore

Re: [intel-sgx-kernel-dev] [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-14 Thread Jarkko Sakkinen
On Tue, Nov 14, 2017 at 10:16:43AM -0800, Sean Christopherson wrote: > This semaphore approach is broken due to the LE process using an anon inode > for > /dev/sgx, which results in sgx_release being called without an accompanying > call > to sgx_open.  This causes deadlocks due to a semaphore

Re: [intel-sgx-kernel-dev] [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-14 Thread Sean Christopherson
On Mon, 2017-11-13 at 21:45 +0200, Jarkko Sakkinen wrote: > --- a/drivers/platform/x86/intel_sgx/sgx_main.c > +++ b/drivers/platform/x86/intel_sgx/sgx_main.c > @@ -88,6 +88,37 @@ u64 sgx_encl_size_max_64; >  u64 sgx_xfrm_mask = 0x3; >  u32 sgx_misc_reserved; >  u32 sgx_xsave_size_tbl[64]; > +bool

Re: [intel-sgx-kernel-dev] [PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-14 Thread Sean Christopherson
On Mon, 2017-11-13 at 21:45 +0200, Jarkko Sakkinen wrote: > --- a/drivers/platform/x86/intel_sgx/sgx_main.c > +++ b/drivers/platform/x86/intel_sgx/sgx_main.c > @@ -88,6 +88,37 @@ u64 sgx_encl_size_max_64; >  u64 sgx_xfrm_mask = 0x3; >  u32 sgx_misc_reserved; >  u32 sgx_xsave_size_tbl[64]; > +bool

[PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-13 Thread Jarkko Sakkinen
Glue code for hosting in-kernel Launch Enclave (LE) by using the user space helper framework. Tokens for launching enclaves are generated with by the following protocol: 1. The driver sends a SIGSTRUCT blob to the LE hosting process to the input pipe. 2. The LE hosting process reads the

[PATCH v5 10/11] intel_sgx: glue code for in-kernel LE

2017-11-13 Thread Jarkko Sakkinen
Glue code for hosting in-kernel Launch Enclave (LE) by using the user space helper framework. Tokens for launching enclaves are generated with by the following protocol: 1. The driver sends a SIGSTRUCT blob to the LE hosting process to the input pipe. 2. The LE hosting process reads the