Skip to content

x86/sgx: Remove EADD worker and page copy

Sean Christopherson linux-sgx 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 13 repliesIn review
  2. v16 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Rebase to master, commit 36e0186296a7.
- Incorporate patch to require EADD be aligned, and add a selftest update to obey the new alignment requirement.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8selftests/x86/sgx: Align enclave binary on 4k boundarytools/testing/selftests/x86/sgx/encl_piggy.S+1 -03 replies
2/8x86/sgx: Require EADD source to be page alignedarch/x86/kernel/cpu/sgx/driver/ioctl.c+2 -11 reply
3/8x86/sgx: Validate generic SECINFO immediately after copying from userarch/x86/kernel/cpu/sgx/driver/ioctl.c+3 -20 replies
4/8x86/sgx: Set SGX_ENCL_PAGE_TCS when allocating encl_pagearch/x86/kernel/cpu/sgx/driver/ioctl.c+6 -52 replies
5/8x86/sgx: Move encl_page insertion into tree out of alloc flowarch/x86/kernel/cpu/sgx/driver/ioctl.c+7 -90 replies
6/8x86/sgx: Allocate encl_page prior to taking encl->lockarch/x86/kernel/cpu/sgx/driver/ioctl.c+13 -160 replies
7/8x86/sgx: Remove the EADD page workerarch/x86/kernel/cpu/sgx/driver/ioctl.c arch/x86/kernel/cpu/sgx/driver/main.c arch/x86/kernel/cpu/sgx/encl.h+40 -1570 replies
8/8x86/sgx: Pass userspace source address directly to EADDarch/x86/kernel/cpu/sgx/driver/ioctl.c+33 -1156 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH for_v22 v2 0/8] x86/sgx: Remove EADD worker and page copy

As suggested by Andy, remove the work queue in favor of handling the entire EADD flow in the context of the ioctl(). After the worker is gone, pass the source page/address directly to EADD instead of first copying the data into kernel memory.

v2:
- Rebase to master, commit 36e0186296a7.
- Incorporate patch to require EADD be aligned, and add a selftest update to obey the new alignment requirement.

Sean Christopherson (8):
selftests/x86/sgx: Align enclave binary on 4k boundary x86/sgx: Require EADD source to be page aligned
x86/sgx: Validate generic SECINFO immediately after copying from user x86/sgx: Set SGX_ENCL_PAGE_TCS when allocating encl_page x86/sgx: Move encl_page insertion into tree out of alloc flow x86/sgx: Allocate encl_page prior to taking encl->lock x86/sgx: Remove the EADD page worker
x86/sgx: Pass userspace source address directly to EADD

 arch/x86/kernel/cpu/sgx/driver/ioctl.c       | 405 +++++--------------
 arch/x86/kernel/cpu/sgx/driver/main.c        |   4 -
 arch/x86/kernel/cpu/sgx/encl.h               |   2 -
 tools/testing/selftests/x86/sgx/encl_piggy.S |   1 +
 4 files changed, 106 insertions(+), 306 deletions(-)
Signature · 1 line
2.22.0