linux-stable/tools/testing/selftests/sgx
Reinette Chatre b564982fda selftests/sgx: Introduce TCS initialization enclave operation
The Thread Control Structure (TCS) contains meta-data used by the
hardware to save and restore thread specific information when
entering/exiting the enclave. A TCS can be added to an initialized
enclave by first adding a new regular enclave page, initializing the
content of the new page from within the enclave, and then changing that
page's type to a TCS.

Support the initialization of a TCS from within the enclave.
The variable information needed that should be provided from outside
the enclave is the address of the TCS, address of the State Save Area
(SSA), and the entry point that the thread should use to enter the
enclave. With this information provided all needed fields of a TCS
can be initialized.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lkml.kernel.org/r/bad6052056188bde753a54313da1ac8f1e29088a.1652137848.git.reinette.chatre@intel.com
2022-07-07 10:13:04 -07:00
..
.gitignore
call.S selftests/sgx: Rename 'eenter' and 'sgx_call_vdso' 2021-06-15 16:21:23 -06:00
defines.h selftests/sgx: Introduce TCS initialization enclave operation 2022-07-07 10:13:04 -07:00
load.c selftests/sgx: Fix NULL-pointer-dereference upon early test failure 2022-02-11 13:52:47 -08:00
main.c selftests/sgx: Test two different SGX2 EAUG flows 2022-07-07 10:13:04 -07:00
main.h selftests/sgx: Create a heap for the test enclave 2021-11-15 11:34:03 -08:00
Makefile selftests/sgx: Treat CC as one argument 2022-02-17 11:55:17 -08:00
sign_key.pem
sign_key.S
sigstruct.c selftests/sgx: Make data measurement for an enclave segment optional 2021-11-15 11:34:01 -08:00
test_encl.c selftests/sgx: Introduce TCS initialization enclave operation 2022-07-07 10:13:04 -07:00
test_encl.lds selftests/sgx: Refine the test enclave to have storage 2021-06-15 16:27:23 -06:00
test_encl_bootstrap.S selftests/sgx: Introduce dynamic entry point 2022-07-07 10:13:04 -07:00