STRUCT SGX_ENCLAVE_RESTRICT_PERMISSIONS(9)
π NAME π
okay so bestie, this is struct sgx_enclave_restrict_permissions β literally the parameters struct for the ioctl %SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS π and yes we're doing this in the Kernel API Manual, you're welcome, iykyk β¨
π¦ SYNOPSIS π¦
struct sgx_enclave_restrict_permissions {
__u64 offset;
__u64 length;
__u64 permissions;
__u64 result;
__u64 count;
};
no cap, that's the whole vibe of it π«Ά
πΈ Members πΈ
offsetβ the starting page offset babes, and it is page aligned relative to the enclave base address defined in SECS π don't come at me with your unaligned nonsense, it's giving misaligned and we're not doing that πlengthβ how much memory we're talking about, and it has to be a multiple of the page size β¨ periodt.permissionsβ the new permission bits for the pages in the range described byoffsetandlengthπ this is the main character field, lowkey the whole reason the struct exists πresultβ (output) the SGX result code of theENCLS[EMODPR]function π that's the function name, character for character, put some respect on it πcountβ (output) bytes successfully changed, and yup, it's a multiple of page size π§ slay.
π SEE ALSO π
go look at these too bestie, they're all literally iconic β¨
- Kernel file
./arch/x86/include/uapi/asm/sgx.h enum sgx_page_flags(9)struct sgx_enclave_create(9)struct sgx_enclave_add_pages(9)struct sgx_enclave_init(9)struct sgx_enclave_provision(9)struct sgx_enclave_modify_types(9)struct sgx_enclave_remove_pages(9)sgx_enclave_user_handler_t(9)struct sgx_enclave_run(9)vdso_sgx_enter_enclave_t(9)
and that's the whole thing, no notes π― this page lives in ./arch/x86/include/uapi/asm, dated October 2026 β yeah ik, future vibes π¦ go read it again if you zoned out, i believe in you π«Άπ
π¦ 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