linux-sgx.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for_v37 0/6] x86/vdso: x86/sgx: Rework SGX vDSO API
@ 2020-09-04 10:44 Sean Christopherson
  2020-09-04 10:44 ` [PATCH for_v37 1/6] x86/vdso: x86/sgx: Explicitly force 8-byte CMP for detecting user handler Sean Christopherson
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Sean Christopherson @ 2020-09-04 10:44 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: Nathaniel McCallum, Cedric Xing, Jethro Beekman, Andy Lutomirski,
	linux-sgx

Rework __vdso_sgx_enter_enclave() to move all input/output params, except
for pass-through GPRs, into a single struct.  With the new struct, add
a pass-through param requested by Nathaniel[1], fix a long-standing nit
from Andy[2], and add a flags field to allow for future extensions.

 1. Add an opaque param to pass data from the runtime to its handler.
    https://lkml.kernel.org/r/CAOASepOFh-vOrNZEVDFrDSuHs+9GEzzpXUTG-fZMuyjWAkpRWw@mail.gmail.com

 2. Use a dedicated exit reason instead of using -EFAULT for "exception"
    (and effectively -EINTR for interrupts, too).
    https://lkml.kernel.org/r/90D05734-1583-4306-A9A4-18E4A1390F3B@amacapital.net

RFC->V1:
  - Drop the EXIT_ON_INTERRUPT patch. [Andy]
  - Fix the macro names in the assembly code. [Jarkko]
  - Move the leaf back into the exception sub-struct.  The leaf is fully
    redundant with SGX_SYNCHRONOUS_EXIT.
  - Add selftest support. [Jarkko]

Jarkko, I didn't address you comment about moving the vDSO kernel docs
comments to the .rst file because I have an question on that and didn't
want to hold this up.  But Intel's mail servers appear to be on the fritz,
so it might be a moot point...

Sean Christopherson (6):
  x86/vdso: x86/sgx: Explicitly force 8-byte CMP for detecting user
    handler
  x86/vdso: x86/sgx: Rework __vdso_sgx_enter_enclave() API
  x86/vdso: x86/sgx: Introduce dedicated SGX exit reasons for vDSO
  selftests/sgx: Update the SGX selftest to match the reworked vDSO API
  selftests/sgx: Sanity check the return value of the vDSO call
  selftests/sgx: Add a smoke test to ensure the user handler is invoked

 arch/x86/entry/vdso/vsgx_enter_enclave.S | 76 +++++++++++++-------
 arch/x86/include/uapi/asm/sgx.h          | 88 ++++++++++++++++--------
 tools/testing/selftests/sgx/call.S       | 10 +--
 tools/testing/selftests/sgx/main.c       | 61 ++++++++++++----
 tools/testing/selftests/sgx/main.h       |  2 +-
 5 files changed, 160 insertions(+), 77 deletions(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-09-04 14:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 10:44 [PATCH for_v37 0/6] x86/vdso: x86/sgx: Rework SGX vDSO API Sean Christopherson
2020-09-04 10:44 ` [PATCH for_v37 1/6] x86/vdso: x86/sgx: Explicitly force 8-byte CMP for detecting user handler Sean Christopherson
2020-09-04 10:44 ` [PATCH for_v37 2/6] x86/vdso: x86/sgx: Rework __vdso_sgx_enter_enclave() API Sean Christopherson
2020-09-04 13:46   ` Jarkko Sakkinen
2020-09-04 10:44 ` [PATCH for_v37 3/6] x86/vdso: x86/sgx: Introduce dedicated SGX exit reasons for vDSO Sean Christopherson
2020-09-04 14:06   ` Jarkko Sakkinen
2020-09-04 10:44 ` [PATCH for_v37 4/6] selftests/sgx: Update the SGX selftest to match the reworked vDSO API Sean Christopherson
2020-09-04 14:07   ` Jarkko Sakkinen
2020-09-04 10:44 ` [PATCH for_v37 5/6] selftests/sgx: Sanity check the return value of the vDSO call Sean Christopherson
2020-09-04 14:07   ` Jarkko Sakkinen
2020-09-04 10:44 ` [PATCH for_v37 6/6] selftests/sgx: Add a smoke test to ensure the user handler is invoked Sean Christopherson
2020-09-04 14:10   ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).