STRUCT SGX_SIGSTRUCT_BODY(9)
π 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 requiredmiscselectin 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 SECSxfrm_maskβ the required XFRM in SECSmrenclaveβ 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]andreserved3[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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms