Re: [PATCH v38 15/24] x86/sgx: Enable provisioning for remote attestation

2020-10-01 Thread Sean Christopherson
On Tue, Sep 15, 2020 at 02:05:13PM +0300, Jarkko Sakkinen wrote: > +/** > + * sgx_ioc_enclave_set_attribute - handler for %SGX_IOC_ENCLAVE_PROVISION > + * @filep: open file to /dev/sgx > + * @arg: userspace pointer to a struct sgx_enclave_provision instance > + * > + * Mark the enclave as bei

Re: [PATCH v38 15/24] x86/sgx: Enable provisioning for remote attestation

2020-09-22 Thread Borislav Petkov
On Tue, Sep 22, 2020 at 12:26:38AM +0300, Jarkko Sakkinen wrote: > BTW, probably would make sense to rewrite the short summary as: > > "x86/sgx: Add SGX_IOC_ENCLAVE_PROVISION" > > for the sake of consistency with the three precursoring patches. Ok. Thx. -- Regards/Gruss, Boris. https://p

Re: [PATCH v38 15/24] x86/sgx: Enable provisioning for remote attestation

2020-09-21 Thread Jarkko Sakkinen
On Mon, Sep 21, 2020 at 09:41:56PM +0200, Borislav Petkov wrote: > On Mon, Sep 21, 2020 at 10:27:06PM +0300, Jarkko Sakkinen wrote: > > 'sgx_dev_enclave' is successfully register whenever that happens. Am I > > missing something here? > > No, I was missing the fact that you have *two* misc devices

Re: [PATCH v38 15/24] x86/sgx: Enable provisioning for remote attestation

2020-09-21 Thread Borislav Petkov
On Mon, Sep 21, 2020 at 10:27:06PM +0300, Jarkko Sakkinen wrote: > 'sgx_dev_enclave' is successfully register whenever that happens. Am I > missing something here? No, I was missing the fact that you have *two* misc devices and you're deregistering the first one in the error path of the second. F

Re: [PATCH v38 15/24] x86/sgx: Enable provisioning for remote attestation

2020-09-21 Thread Jarkko Sakkinen
On Mon, Sep 21, 2020 at 08:07:28PM +0200, Borislav Petkov wrote: > On Tue, Sep 15, 2020 at 02:28:33PM +0300, Jarkko Sakkinen wrote: > > @@ -181,5 +192,12 @@ int __init sgx_drv_init(void) > > return ret; > > } > > > > + ret = misc_register(&sgx_dev_provision); > > + if (ret) {

Re: [PATCH v38 15/24] x86/sgx: Enable provisioning for remote attestation

2020-09-21 Thread Borislav Petkov
On Tue, Sep 15, 2020 at 02:28:33PM +0300, Jarkko Sakkinen wrote: > @@ -181,5 +192,12 @@ int __init sgx_drv_init(void) > return ret; > } > > + ret = misc_register(&sgx_dev_provision); > + if (ret) { > + pr_err("Creating /dev/sgx/provision failed with %d.\n",