Re: [PATCH v30 12/20] x86/sgx: Add a page reclaimer

From: Sean Christopherson
Date: Fri May 22 2020 - 17:52:49 EST


On Fri, May 22, 2020 at 10:57:05PM +0300, Jarkko Sakkinen wrote:
> v31:
> * Unset SGX_ENCL_IOCTL in the error path of checking encl->flags in order
> to prevent leaving it set and thus block any further ioctl calls.
> * Added missing cleanup_srcu_struct() call to sgx_encl_release().
> * Take encl->lock in sgx_encl_add_page() in order to prevent races with
> the page reclaimer.
> * Fix a use-after-free bug from page reclaimer. Call kref_put() for the
> encl->refcount only after putting enclave page back to the active page
> list because it could be the last ref to the enclave.
>
> I'm ready to send a new version of the patch set once there is a
> conclusion with the sigstruct vendor field.

Fire away, nothing pending on my end, the cgroup tests appear to be running
clean.