Re: [PATCH] x86/sgx: Allows ioctl PROVISION to execute before CREATE

2021-01-23 Thread Tianjia Zhang
On 1/21/21 6:37 AM, Jarkko Sakkinen wrote: On Thu, Jan 21, 2021 at 12:34:49AM +0200, Jarkko Sakkinen wrote: On Wed, Jan 20, 2021 at 11:57:18AM +0800, Tianjia Zhang wrote: Hi, On 1/20/21 4:05 AM, Sean Christopherson wrote: On Mon, Jan 18, 2021, Tianjia Zhang wrote: In function sgx_encl_cre

Re: [PATCH] x86/sgx: Allows ioctl PROVISION to execute before CREATE

2021-01-20 Thread Jarkko Sakkinen
On Thu, Jan 21, 2021 at 12:34:49AM +0200, Jarkko Sakkinen wrote: > On Wed, Jan 20, 2021 at 11:57:18AM +0800, Tianjia Zhang wrote: > > Hi, > > > > On 1/20/21 4:05 AM, Sean Christopherson wrote: > > > On Mon, Jan 18, 2021, Tianjia Zhang wrote: > > > > In function sgx_encl_create(), the logic of dire

Re: [PATCH] x86/sgx: Allows ioctl PROVISION to execute before CREATE

2021-01-20 Thread Jarkko Sakkinen
On Wed, Jan 20, 2021 at 11:57:18AM +0800, Tianjia Zhang wrote: > Hi, > > On 1/20/21 4:05 AM, Sean Christopherson wrote: > > On Mon, Jan 18, 2021, Tianjia Zhang wrote: > > > In function sgx_encl_create(), the logic of directly assigning > > > value to attributes_mask determines that the call to > >

Re: [PATCH] x86/sgx: Allows ioctl PROVISION to execute before CREATE

2021-01-20 Thread Jarkko Sakkinen
On Mon, Jan 18, 2021 at 09:33:35PM +0800, Tianjia Zhang wrote: > In function sgx_encl_create(), the logic of directly assigning > value to attributes_mask determines that the call to > SGX_IOC_ENCLAVE_PROVISION must be after the command of > SGX_IOC_ENCLAVE_CREATE. If change this assignment stateme

Re: [PATCH] x86/sgx: Allows ioctl PROVISION to execute before CREATE

2021-01-19 Thread Tianjia Zhang
Hi, On 1/20/21 4:05 AM, Sean Christopherson wrote: On Mon, Jan 18, 2021, Tianjia Zhang wrote: In function sgx_encl_create(), the logic of directly assigning value to attributes_mask determines that the call to SGX_IOC_ENCLAVE_PROVISION must be after the command of SGX_IOC_ENCLAVE_CREATE. If cha

Re: [PATCH] x86/sgx: Allows ioctl PROVISION to execute before CREATE

2021-01-19 Thread Sean Christopherson
On Mon, Jan 18, 2021, Tianjia Zhang wrote: > In function sgx_encl_create(), the logic of directly assigning > value to attributes_mask determines that the call to > SGX_IOC_ENCLAVE_PROVISION must be after the command of > SGX_IOC_ENCLAVE_CREATE. If change this assignment statement to > or operation

[PATCH] x86/sgx: Allows ioctl PROVISION to execute before CREATE

2021-01-18 Thread Tianjia Zhang
In function sgx_encl_create(), the logic of directly assigning value to attributes_mask determines that the call to SGX_IOC_ENCLAVE_PROVISION must be after the command of SGX_IOC_ENCLAVE_CREATE. If change this assignment statement to or operation, the PROVISION command can be executed earlier and m