From 96023c2a8c240bd00c68b9a9e88c5989b2c80db1 Mon Sep 17 00:00:00 2001 From: Raoul Strackx Date: Mon, 5 Sep 2022 13:34:04 +0200 Subject: [PATCH] Document `TCS` struct limitations --- intel-sgx/fortanix-sgx-abi/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/intel-sgx/fortanix-sgx-abi/src/lib.rs b/intel-sgx/fortanix-sgx-abi/src/lib.rs index 3511ae34..17188e6c 100644 --- a/intel-sgx/fortanix-sgx-abi/src/lib.rs +++ b/intel-sgx/fortanix-sgx-abi/src/lib.rs @@ -441,6 +441,9 @@ impl Usercalls { } /// The absolute address of a TCS in the current enclave. +/// +/// To ensure a TCS struct will never be located at address 0, a TCS struct should not be located +/// at the beginning of an enclave. // FIXME: `u8` should be some `extern type` instead. #[cfg_attr(feature = "rustc-dep-of-std", unstable(feature = "sgx_platform", issue = "56975"))] pub type Tcs = NonNull;