public inbox for linux-sgx@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] selftests/sgx: Fix compilation errors.
@ 2023-07-24 16:58 Jo Van Bulck
  2023-07-24 16:58 ` [PATCH 1/5] selftests/sgx: Fix uninitialized pointer dereference in error path Jo Van Bulck
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: Jo Van Bulck @ 2023-07-24 16:58 UTC (permalink / raw)
  To: jarkko, linux-sgx, linux-kernel; +Cc: dave.hansen, Jo Van Bulck

Hi,

This patch series ensures that all SGX selftests succeed when compiling
with optimizations (as tested with -O{0,1,2,3,s} for both gcc 11.3.0 and
clang 14.0.0). The aim of the patches is to avoid reliance on undefined,
compiler-specific behavior that can make the test results fragile.

If deemed useful, I can also include an elementary wrapper shell script to
compile and run the tests for different compilers (gcc/clang) and
optimization levels.

Best,
Jo

Jo Van Bulck (5):
  selftests/sgx: Fix uninitialized pointer dereference in error path.
  selftests/sgx: Fix function pointer relocation in test enclave.
  selftests/sgx: Ensure correct secinfo struct alignment in test
    enclave.
  selftests/sgx: Ensure expected enclave data buffer size and placement.
  selftests/sgx: Enclave freestanding compilation + separate linker
    options.

 tools/testing/selftests/sgx/Makefile            | 12 +++++++-----
 tools/testing/selftests/sgx/sigstruct.c         |  2 +-
 tools/testing/selftests/sgx/test_encl.c         | 17 +++++++++++------
 tools/testing/selftests/sgx/test_encl.lds       |  2 ++
 .../testing/selftests/sgx/test_encl_bootstrap.S |  5 +++++
 5 files changed, 26 insertions(+), 12 deletions(-)


base-commit: ad0dbc1609ab4b01c9c423d3dd6bb6e4f19dee70
-- 
2.34.1


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

end of thread, other threads:[~2023-08-21 13:24 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24 16:58 [PATCH 0/5] selftests/sgx: Fix compilation errors Jo Van Bulck
2023-07-24 16:58 ` [PATCH 1/5] selftests/sgx: Fix uninitialized pointer dereference in error path Jo Van Bulck
2023-07-28 19:03   ` Jarkko Sakkinen
2023-08-07  6:06     ` Jo Van Bulck
2023-07-28 19:04   ` Jarkko Sakkinen
2023-08-03  3:51   ` Huang, Kai
2023-08-07  6:15     ` Jo Van Bulck
2023-07-24 16:58 ` [PATCH 2/5] selftests/sgx: Fix function pointer relocation in test enclave Jo Van Bulck
2023-07-28 19:05   ` Jarkko Sakkinen
2023-08-03  3:58   ` Huang, Kai
2023-08-07  7:13     ` Jo Van Bulck
2023-08-18 12:54       ` Huang, Kai
2023-08-19  2:30         ` Jo Van Bulck
2023-08-21 11:04           ` Huang, Kai
2023-08-21 13:24             ` Jo Van Bulck
2023-07-24 16:58 ` [PATCH 3/5] selftests/sgx: Ensure correct secinfo struct alignment " Jo Van Bulck
2023-07-28 19:05   ` Jarkko Sakkinen
2023-08-03  4:00   ` Huang, Kai
2023-08-07  9:21     ` Jo Van Bulck
2023-07-24 16:58 ` [PATCH 4/5] selftests/sgx: Ensure expected enclave data buffer size and placement Jo Van Bulck
2023-07-28 19:19   ` Jarkko Sakkinen
2023-08-07  9:41     ` Jo Van Bulck
2023-08-18 13:07       ` Huang, Kai
2023-08-19  1:11         ` Jo Van Bulck
2023-08-03  4:22   ` Huang, Kai
2023-08-07  9:50     ` Jo Van Bulck
2023-07-24 16:58 ` [PATCH 5/5] selftests/sgx: Enclave freestanding compilation + separate linker options Jo Van Bulck
2023-07-28 19:22   ` Jarkko Sakkinen
2023-08-07 10:03     ` Jo Van Bulck
2023-07-28 19:01 ` [PATCH 0/5] selftests/sgx: Fix compilation errors Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox