diff options
| author | Reinette Chatre <[email protected]> | 2022-05-10 18:09:01 +0000 |
|---|---|---|
| committer | Dave Hansen <[email protected]> | 2022-07-07 17:13:04 +0000 |
| commit | 7eb4370152beb2f1e25543088bce2e3f0621ab81 (patch) | |
| tree | 4ba1c091e38f548125757eccd65f92b585c354ad /drivers/fpga/machxo2-spi.c | |
| parent | selftests/sgx: Test two different SGX2 EAUG flows (diff) | |
| download | kernel-7eb4370152beb2f1e25543088bce2e3f0621ab81.tar.gz kernel-7eb4370152beb2f1e25543088bce2e3f0621ab81.zip | |
selftests/sgx: Introduce dynamic entry point
The test enclave (test_encl.elf) is built with two initialized
Thread Control Structures (TCS) included in the binary. Both TCS are
initialized with the same entry point, encl_entry, that correctly
computes the absolute address of the stack based on the stack of each
TCS that is also built into the binary.
A new TCS can be added dynamically to the enclave and requires to be
initialized with an entry point used to enter the enclave. Since the
existing entry point, encl_entry, assumes that the TCS and its stack
exists at particular offsets within the binary it is not able to handle
a dynamically added TCS and its stack.
Introduce a new entry point, encl_dyn_entry, that initializes the
absolute address of that thread's stack to the address immediately
preceding the TCS itself. It is now possible to dynamically add a
contiguous memory region to the enclave with the new stack preceding
the new TCS. With the new TCS initialized with encl_dyn_entry as entry
point the absolute address of the stack is computed correctly on entry.
Signed-off-by: Reinette Chatre <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Acked-by: Jarkko Sakkinen <[email protected]>
Link: https://lkml.kernel.org/r/93e9c420dedf5f773ba6965c18245bc7d62aca83.1652137848.git.reinette.chatre@intel.com
Diffstat (limited to 'drivers/fpga/machxo2-spi.c')
0 files changed, 0 insertions, 0 deletions
