STRUCT SGX_SIGSTRUCT_BODY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct sgx_sigstruct_body(9) ✨

okay bestie, welcome to the kernel API manual, section 9 β€” we're looking at struct sgx_sigstruct_body(9) today and honestly? it's giving "the actual personality of the enclave" 🫢. This is where an SGX enclave's whole identity lives β€” what it is, what it's allowed to do, and the hash of everything inside it. Let's get into it.


🌸 NAME 🌸

struct sgx_sigstruct_body β€” literally defines the contents of the enclave πŸ’– (yes, that's the whole job, and it takes it very seriously)


πŸŽ€ SYNOPSIS πŸŽ€

struct sgx_sigstruct_body {
    u32 miscselect;
    u32 misc_mask;
    u8 reserved2[20];
    u64 attributes;
    u64 xfrm;
    u64 attributes_mask;
    u64 xfrm_mask;
    u8 mrenclave[32];
    u8 reserved3[32];
    u16 isvprodid;
    u16 isvsvn;
 };

πŸ¦‹ MEMBERS πŸ¦‹

so each field is a whole little moment, let me introduce them all:

πŸ’œ the fields

  • miscselect β€” extra info that gets stored to an SSA frame. it's the little extras, yk?
  • misc_mask β€” the required miscselect in SECS. like, the non-negotiable bits πŸ”₯
  • attributes β€” the attributes for the enclave. its whole vibe spec.
  • xfrm β€” XSave-Feature Request Mask (a subset of XCR0, no cap πŸ™ˆ)
  • attributes_mask β€” the required attributes in SECS
  • xfrm_mask β€” the required XFRM in SECS
  • mrenclave β€” SHA256-hash of the enclave contents. the enclave's fingerprint, its main character ID πŸ’…
  • isvprodid β€” a user-defined value that is used in key derivation ⭐
  • isvsvn β€” a user-defined value that is used in key derivation ⭐ (yes bestie, same description as its sibling β€” they're a matching set, periodt)
πŸ’€ heads up: reserved2[20] and reserved3[32] are chilling in there too β€” reserved, so hands off, don't touch, they're not for us πŸ“

🌈 SEE ALSO 🌈

Kernel file ./arch/x86/include/asm/sgx.h and its whole friend group β€” go read these next, iykyk:

  • SGX_ENCLS_FAULT_FLAG(9)
  • enum sgx_return_code(9)
  • enum sgx_miscselect(9)
  • enum sgx_attribute(9)
  • struct sgx_secs(9)
  • enum sgx_tcs_flags(9)
  • struct sgx_tcs(9)
  • struct sgx_pageinfo(9)
  • enum sgx_page_type(9)
  • enum sgx_secinfo_flags(9)
  • struct sgx_secinfo(9)
  • struct sgx_pcmd(9)
  • struct sgx_sigstruct_header(9)
  • struct sgx_sigstruct(9)

and that's the whole page, bestie, you ate that 🧚✨ sign-off time: this came from ./arch/x86/include/asm, dated October 2026, and it's page struct sgx_sigstruct_body(9) of the Kernel API Manual. mwah πŸ’‹πŸ‘‘

πŸ“¦ where this page comes from