Re: [PATCH 4/4] x86/sgx: Take encl->lock inside of mm->mmap_sem for EADD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 26, 2019 at 05:11:28PM -0700, Sean Christopherson wrote:
> Reverse the order in which encl->lock and mm->mmap_sem are taken during
> ENCLAVE_ADD_PAGE so as to adhere to SGX's lock ordering requirements.
> Attempting to acquire mm->mmap_sem while holding encl->lock can result
> in deadlock.
> 
> Refactor EEXTEND and the final bookkeeping out of __sgx_encl_add_page()
> so that mm->mmap_sem can be dropped after EADD without spreading the
> lock/unlock across multiple functions.
> 
> Reported-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>

Thanks, looks good.

Acked-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>

/Jarkko



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux