Re: [PATCH v4 03/25] x86/sgx: Wipe out EREMOVE from sgx_free_epc_page()

2021-03-26 Thread Jarkko Sakkinen
On Fri, Mar 26, 2021 at 09:48:48PM +0200, Jarkko Sakkinen wrote: > On Thu, Mar 25, 2021 at 10:30:57PM +1300, Kai Huang wrote: > > EREMOVE takes a page and removes any association between that page and > > an enclave. It must be run on a page before it can be added into > > another enclave. Curren

Re: [PATCH v4 03/25] x86/sgx: Wipe out EREMOVE from sgx_free_epc_page()

2021-03-26 Thread Kai Huang
> > diff --git a/arch/x86/kernel/cpu/sgx/sgx.h b/arch/x86/kernel/cpu/sgx/sgx.h > > index 653af8ca1a25..6b21a165500e 100644 > > --- a/arch/x86/kernel/cpu/sgx/sgx.h > > +++ b/arch/x86/kernel/cpu/sgx/sgx.h > > @@ -13,6 +13,11 @@ > > #undef pr_fmt > > #define pr_fmt(fmt) "sgx: " fmt > > > > +/* E

Re: [PATCH v4 03/25] x86/sgx: Wipe out EREMOVE from sgx_free_epc_page()

2021-03-26 Thread Jarkko Sakkinen
On Thu, Mar 25, 2021 at 10:30:57PM +1300, Kai Huang wrote: > EREMOVE takes a page and removes any association between that page and > an enclave. It must be run on a page before it can be added into > another enclave. Currently, EREMOVE is run as part of pages being freed > into the SGX page allo

[PATCH v4 03/25] x86/sgx: Wipe out EREMOVE from sgx_free_epc_page()

2021-03-25 Thread Kai Huang
EREMOVE takes a page and removes any association between that page and an enclave. It must be run on a page before it can be added into another enclave. Currently, EREMOVE is run as part of pages being freed into the SGX page allocator. It is not expected to fail, as it would indicate a use-afte