Skip to content

Add an oversubscription test

Jarkko Sakkinen linux-doc linux-kselftest linux-sgx lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 3 repliesIn review
  2. v38 patches 1 replySuperseded
  3. v24 patches 2 repliesSuperseded

v3 from the cover letter

* Reorganized the patch set into smaller pieces, and refactored the code so that the test enclave can be created inside each test case. Added a new test case unclobbered_vdso_oversubscribed that creates a large enough heap to fill all of the available SGX reserved memory (EPC).

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8x86/sgx: Add /sys/kernel/debug/x86/sgx_total_memDocumentation/x86/sgx.rst arch/x86/kernel/cpu/sgx/main.c+15 -13 replies
2/8selftests/sgx: Assign source for each segmenttools/testing/selftests/sgx/load.c tools/testing/selftests/sgx/main.h tools/testing/selftests/sgx/sigstruct.c+8 -60 replies
3/8selftests/sgx: Make data measurement for an enclave segment optionaltools/testing/selftests/sgx/load.c tools/testing/selftests/sgx/main.h tools/testing/selftests/sgx/sigstruct.c+10 -30 replies
4/8selftests/sgx: Create a heap for the test enclavetools/testing/selftests/sgx/load.c tools/testing/selftests/sgx/main.c tools/testing/selftests/sgx/main.h+26 -90 replies
5/8selftests/sgx: Dump segments and /proc/self/maps only on failuretools/testing/selftests/sgx/main.c+12 -110 replies
6/8selftests/sgx: Encpsulate the test enclave creationtools/testing/selftests/sgx/main.c+26 -180 replies
7/8selftests/sgx: Move setup_test_encl() to each TEST_F()tools/testing/selftests/sgx/main.c+15 -40 replies
8/8selftests/sgx: Add a new kselftest: unclobbered_vdso_oversubscribedtools/testing/selftests/sgx/main.c tools/testing/selftests/sgx/main.h+60 -00 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchDave Hansen
1/8A-b
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/8] Add an oversubscription test

The goal of these patches is to add a test case for a SGX reserved memory oversubscription, i.e. make sure that the page reclaimer and and the page fault handler are working correctly.

Change Log
==========

v3:
* Reorganized the patch set into smaller pieces, and refactored the code so that the test enclave can be created inside each test case. Added a new test case unclobbered_vdso_oversubscribed that creates a large enough heap to fill all of the available SGX reserved memory (EPC).

Jarkko Sakkinen (8):
x86/sgx: Add /sys/kernel/debug/x86/sgx_total_mem selftests/sgx: Assign source for each segment selftests/sgx: Make data measurement for an enclave segment optional selftests/sgx: Create a heap for the test enclave selftests/sgx: Dump segments and /proc/self/maps only on failure selftests/sgx: Encpsulate the test enclave creation selftests/sgx: Move setup_test_encl() to each TEST_F() selftests/sgx: Add a new kselftest: unclobbered_vdso_oversubscribed

 Documentation/x86/sgx.rst               |   6 ++
 arch/x86/kernel/cpu/sgx/main.c          |  10 +-
 tools/testing/selftests/sgx/load.c      |  40 ++++++--
 tools/testing/selftests/sgx/main.c      | 123 +++++++++++++++++++-----
 tools/testing/selftests/sgx/main.h      |   7 +-
 tools/testing/selftests/sgx/sigstruct.c |  12 ++-
 6 files changed, 159 insertions(+), 39 deletions(-)
Signature · 1 line
2.32.0