Skip to content

x86/sgx: Make vDSO callable from C

Sean Christopherson linux-sgx 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v25 patches 15 repliesSuperseded
  3. v18 patches 12 repliesSuperseded

Changes in v3 from the cover letter

- Rebase to Jarkko's latest master, commit 47cedc7c1ed2 ("docs: ...")
- Squash into two patches. [Jarkko]
- s/Important/NOTE in a comment. [Jarkko]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/sgx: vdso: Make __vdso_sgx_enter_enclave() callable from C codearch/x86/entry/vdso/vsgx_enter_enclave.S arch/x86/include/uapi/asm/sgx.h tools/testing/selftests/sgx/call.S +3 more+68 -630 replies
2/2selftests/sgx: Add selftest to invoke __vsgx_enter_enclave() from Ctools/testing/selftests/sgx/main.c tools/testing/selftests/sgx/test_encl_bootstrap.S+16 -80 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH for_v29 v3 0/2] x86/sgx: Make vDSO callable from C

Nathaniel pointed out that __vdso_sgx_enter_enclave() is tantalizingly close to being callable from C (with caveats and a cooperative enclave). The missing pieces are preserving %rbx and taking @leaf as a standard parameter.

v3:
- Rebase to Jarkko's latest master, commit 47cedc7c1ed2 ("docs: ...")
- Squash into two patches. [Jarkko]
- s/Important/NOTE in a comment. [Jarkko]

v2:
- Rebase to Jarkko's latest master, commit 402fb35a477a, "docs: ...")
- Add CFI directive for RBX. [Cedric]

v1:
- https://patchwork.kernel.org/cover/11446355/

Sean Christopherson (2):
x86/sgx: vdso: Make __vdso_sgx_enter_enclave() callable from C code selftests/sgx: Add selftest to invoke __vsgx_enter_enclave() from C

 arch/x86/entry/vdso/vsgx_enter_enclave.S      | 64 ++-----------------
 arch/x86/include/uapi/asm/sgx.h               | 61 ++++++++++++++++++
 tools/testing/selftests/sgx/call.S            |  1 -
 tools/testing/selftests/sgx/defines.h         |  1 +
 tools/testing/selftests/sgx/main.c            | 20 ++++--
 tools/testing/selftests/sgx/main.h            |  2 +-
 .../selftests/sgx/test_encl_bootstrap.S       |  6 +-
 7 files changed, 84 insertions(+), 71 deletions(-)
Signature · 1 line
2.26.0