sgx_enclave_..._permissions(9)
β¨ 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:
sgx_ioc_enclave_create(9)sgx_ioc_enclave_add_pages(9)sgx_ioc_enclave_init(9)sgx_ioc_enclave_provision(9)sgx_ioc_enclave_restrict_permissions(9)sgx_enclave_modify_types(9)sgx_ioc_enclave_modify_types(9)sgx_encl_remove_pages(9)sgx_ioc_enclave_remove_pages(9)
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
- 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