STRUCT SGX_ENCLAVE_RESTRICT_PERMISSIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 by offset and length πŸ‘‘ this is the main character field, lowkey the whole reason the struct exists πŸŽ€
  • result β€” (output) the SGX result code of the ENCLS[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 ✨


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