Re: [PATCH for v24 v2 1/4] x86/sgx: Destroy enclave if EADD fails

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

 



On Tue, Nov 05, 2019 at 01:20:53PM +0200, Jarkko Sakkinen wrote:
> __sgx_encl_add_page() can only fail in the case of EPCM conflict at least
> in non-artificial situations. Also, it consistent semantics in rollback is
> something to pursue for. Thus, destroy enclave when the EADD fails as we do
> when EEXTEND fails already.

I still don't understand the motiviation for this change, EADD can fault
and fail for reasons that are purely under userspace control.  Yes, it's
all but guaranteed to be a userspace bug, but I can't think of another
instance in the kernel where the reaction to what is effectively an invalid
param is to torch the whole thing.  EEXTEND is special cased because the
kernel doesn't have any other sane choice.



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

  Powered by Linux