STRUCT NE_USER_MEMORY_REGION(9)
π struct ne_user_memory_region β like, the whole manual, bestie π
okay so this is a page straight out of the Kernel API Manual, and it's all about struct ne_user_memory_region β literally the memory region you hand over to be set for an enclave (that's in, btw). yes, in. it's giving "here's my memory, please take it" energy. π«Ά
β¨ NAME β¨
struct ne_user_memory_region β the memory region to be set for an enclave (in). πΈ
π¦ SYNOPSIS π¦
look at her. she's serving struct:
struct ne_user_memory_region {
__u64 flags;
__u64 memory_size;
__u64 userspace_addr;
};
three members, zero drama. iconic. π
π Members π
flagsβ the flags that determine the usage for the memory region (in). like, what is this region even for, you know? πmemory_sizeβ the size, in bytes, of the memory region to be set for an enclave (in). bytes, not vibes. measure her. πuserspace_addrβ the start address of the userspace allocated memory of the memory region to set for an enclave (in). where does it all begin? right here, bestie. πΊοΈ
π SEE ALSO π
adjacent lore, all of it, no skipping (iykyk):
- the kernel file
./include/uapi/linux/nitro_enclaves.h - Nitro Enclaves (NE) Kernel Driver Interface(9)
- NE_CREATE_VM(9)
- NE_ADD_VCPU(9)
- NE_GET_IMAGE_LOAD_INFO(9)
- NE_SET_USER_MEMORY_REGION(9)
- NE_START_ENCLAVE(9)
- NE specific error codes(9)
- NE_ERR_VCPU_ALREADY_USED(9)
- NE_ERR_VCPU_NOT_IN_CPU_POOL(9)
- NE_ERR_VCPU_INVALID_CPU_CORE(9)
- NE_ERR_INVALID_MEM_REGION_SIZE(9)
- NE_ERR_INVALID_MEM_REGION_ADDR(9)
- NE_ERR_UNALIGNED_MEM_REGION_ADDR(9)
- NE_ERR_MEM_REGION_ALREADY_USED(9)
- NE_ERR_MEM_NOT_HUGE_PAGE(9)
- NE_ERR_MEM_DIFFERENT_NUMA_NODE(9)
- NE_ERR_MEM_MAX_REGIONS(9)
- NE_ERR_NO_MEM_REGIONS_ADDED(9)
- NE_ERR_NO_VCPUS_ADDED(9)
- NE_ERR_ENCLAVE_MEM_MIN_SIZE(9)
- NE_ERR_FULL_CORES_NOT_USED(9)
- NE_ERR_NOT_IN_INIT_STATE(9)
- NE_ERR_INVALID_VCPU(9)
- NE_ERR_NO_CPUS_AVAIL_IN_POOL(9)
- NE_ERR_INVALID_PAGE_SIZE(9)
- NE_ERR_INVALID_FLAG_VALUE(9)
- NE_ERR_INVALID_ENCLAVE_CID(9)
- Image load info flags(9)
- NE_EIF_IMAGE(9)
- struct ne_image_load_info(9)
- User memory region flags(9)
- NE_DEFAULT_MEMORY_REGION(9)
- Enclave start info flags(9)
- NE_ENCLAVE_PRODUCTION_MODE(9)
- NE_ENCLAVE_DEBUG_MODE(9)
- struct ne_enclave_start_info(9)
lowkey a whole reading list. bestie go click through them, fr fr. πβ¨
that's the whole page, no cap. source lives at ./include/uapi/linux, dated October 2026 β so like, from the future?? π anyway mwah, go set some memory regions, love u, bye! πππ¦
π¦ 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