Skip to content

Commit 4be3703

Browse files
Merge #408
408: Document `TCS` struct limitations r=jethrogb a=raoulstrackx Document that a TCS struct should never be located as the beginning of an enclave. (ref rust-lang/rust#98391) Co-authored-by: Raoul Strackx <raoul.strackx@fortanix.com>
2 parents 4bbac95 + 96023c2 commit 4be3703

File tree

1 file changed

+3
-0
lines changed
  • intel-sgx/fortanix-sgx-abi/src

1 file changed

+3
-0
lines changed

intel-sgx/fortanix-sgx-abi/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ impl Usercalls {
441441
}
442442

443443
/// The absolute address of a TCS in the current enclave.
444+
///
445+
/// To ensure a TCS struct will never be located at address 0, a TCS struct should not be located
446+
/// at the beginning of an enclave.
444447
// FIXME: `u8` should be some `extern type` instead.
445448
#[cfg_attr(feature = "rustc-dep-of-std", unstable(feature = "sgx_platform", issue = "56975"))]
446449
pub type Tcs = NonNull<u8>;

0 commit comments

Comments
 (0)