Skip to content

Commit

Permalink
Merge #408
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bors[bot] and raoulstrackx committed Sep 5, 2022
2 parents 4bbac95 + 96023c2 commit 4be3703
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions intel-sgx/fortanix-sgx-abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8>;
Expand Down

0 comments on commit 4be3703

Please sign in to comment.