sgx_enclave_..._permissions(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ sgx_enclave_restrict_permissions β€” bestie's guide to locking down EPCM perms ✨

Okay so first things first, this is a page from the Kernel API Manual (section 9, kernel-space girlies only πŸ’…), and it's all about sgx_enclave_restrict_permissions β€” yes the header truncates it to sgx_enclave_..._permissions(9) because even manpage titles have a character limit, iconic honestly.


πŸŽ€ NAME πŸŽ€

sgx_enclave_restrict_permissions β€” literally just restrict EPCM permissions. That's the whole vibe. Nothing more, nothing less. πŸ”’


🌸 SYNOPSIS 🌸

long sgx_enclave_restrict_permissions (struct sgx_encl *encl , struct
sgx_enclave_restrict_permissions *modp );

Two args, one long return. Clean, simple, no cap. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • encl β€” the enclave the pages belong to. Like, which enclave are we even doing this to, bestie? This one. 🏠
  • modp β€” the checked parameters that came from user space, telling you which pages need modifying and what their new permissions should be. Basically the to-do list, already sanity-checked. πŸ“‹

πŸ’– RETURN πŸ’–

  • 0 β€” success! slay, it worked, we ate. πŸŽ‰
  • -errno β€” otherwise. iykyk. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./arch/x86/kernel/cpu/sgx/ioctl.c β€” go read the source, it's giving main character energy. Also go check out the whole friend group:

The whole squad, fr fr. 🫢


ngl if you're messing with enclave permissions you better actually know what you're doing β€” this is kernel-tier stuff, not a vibe check. πŸ™ˆ

and that's the page!! 🌈 sign-off time: this cutie lives in ./arch/x86/kernel/cpu/sgx, dropped October 2026, and yes the manual page name is still the un-abbreviated sgx_enclave_..._permissions(9) because we commit to the bit. πŸ’œπŸ¦‹πŸŒΈ bye bestie, go restrict some perms responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from