[for_v22,00/11] x86/sgx: Bug fixes for v22
mbox series

Message ID 20190808001254.11926-1-sean.j.christopherson@intel.com
Headers show
Series
  • x86/sgx: Bug fixes for v22
Related show

Message

Sean Christopherson Aug. 8, 2019, 12:12 a.m. UTC
A variety of bug fixes, some for issues reported by Shay, the rest for
issues found by inspection.  Sent as a bundle because most of the patches
conflict in one way or another, and so that others can apply on master to
get a stable build.

Sean Christopherson (11):
  x86/sgx: Fix an SECS collision with enclave page at VA=0
  x86/sgx: Fix incorrect NULL pointer check
  x86/sgx: Return '0' when sgx_ioc_enclave_set_attribute() succeeds
  x86/sgx: x86/sgx: Require EADD destination to be page aligned
  x86/sgx: Require EADD source to be page aligned
  x86/sgx: Check the bounds of the enclave address against ELRANGE
  x86/sgx: Check that enclave is created at beginning of EADD/EINIT
    ioctl
  x86/sgx: Do not free enclave resources on redundant ECREATE
  x86/sgx: Refactor error handling for user of sgx_encl_grow()
  x86/sgx: Call sgx_encl_grow() with the enclave's lock held
  x86/sgx: Shrink the enclave if ECREATE/EADD fails

 arch/x86/kernel/cpu/sgx/driver/ioctl.c | 143 +++++++++++++++----------
 arch/x86/kernel/cpu/sgx/encl.c         |  14 ++-
 2 files changed, 97 insertions(+), 60 deletions(-)

Comments

Jarkko Sakkinen Aug. 8, 2019, 3:18 p.m. UTC | #1
On Wed, Aug 07, 2019 at 05:12:43PM -0700, Sean Christopherson wrote:
> A variety of bug fixes, some for issues reported by Shay, the rest for
> issues found by inspection.  Sent as a bundle because most of the patches
> conflict in one way or another, and so that others can apply on master to
> get a stable build.

Thanks for taking care of these! My test environment for SGX is working
again after some issues during last few weeks so should be also albe to
test them.

/Jarkko
Jarkko Sakkinen Aug. 8, 2019, 3:57 p.m. UTC | #2
On Wed, Aug 07, 2019 at 05:12:43PM -0700, Sean Christopherson wrote:
> A variety of bug fixes, some for issues reported by Shay, the rest for
> issues found by inspection.  Sent as a bundle because most of the patches
> conflict in one way or another, and so that others can apply on master to
> get a stable build.

Summary (once with A, I'm ready to squash):

https://patchwork.kernel.org/project/intel-sgx/list/?series=156821

Two of unacked patches just need just some minor rework. 4/11 was the
only with some opens at this point.

Thank you to both you and also to Shay who has done marvelous job catching
those regressions.

/Jarkko
Jarkko Sakkinen Aug. 10, 2019, 11:44 a.m. UTC | #3
On Wed, Aug 07, 2019 at 05:12:43PM -0700, Sean Christopherson wrote:
>   x86/sgx: Require EADD source to be page aligned

Everything else merged expect this.

/Jarkko