NE_START_ENCLAVE(9)
π NAME π
Okay so bestie, welcome to NE_START_ENCLAVE(9) from the Kernel API Manual β and no cap, this is the βhit start on the enclaveβ command. π
Not me being obsessed with an ioctl, but here we are β itβs giving main character energy, fr fr. π
NE_START_ENCLAVE is the command used to trigger enclave start after the enclave resources, such as memory and CPU, have been set. The enclave start info is an input / output parameter. It includes info provided by the caller β enclave cid and flags β and returns the cid (if input cid is 0). The ioctl can be invoked on the enclave fd, after an enclave slot is created and resources, such as memory and vCPUs, are set for an enclave. β¨
π¦ SYNOPSIS π¦
NE_START_ENCLAVE
πΈ CONTEXT πΈ
Process context. Thatβs the whole vibe check β literally process context. π«Ά
π₯ RETURN π₯
Hereβs the return-value tea, bestie β the way that 0 is success and -1 is the βwelpβ path:
0β Logic successfully completed. β-1β There was a failure in the ioctl logic. On failure,errnois set to:EFAULTβcopy_from_user/copy_to_userfailure.NE_ERR_NOT_IN_INIT_STATEβ The enclave is not in init state (init = before being started).NE_ERR_NO_MEM_REGIONS_ADDEDβ No memory regions are set.NE_ERR_NO_VCPUS_ADDEDβ No vCPUs are set.NE_ERR_FULL_CORES_NOT_USEDβ Full core(s) not set for the enclave.NE_ERR_ENCLAVE_MEM_MIN_SIZEβ Enclave memory is less than minimum memory size (64 MiB).NE_ERR_INVALID_FLAG_VALUEβ The value of the provided flag is invalid.NE_ERR_INVALID_ENCLAVE_CIDβ The provided enclave CID is invalid.- Error codes from the NE PCI device request.
π SEE ALSO π
Your required-reading list, bestie β every single reference from the original SEE ALSO, and I am not skipping a crumb π:
- 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 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)struct ne_user_memory_region(9)Enclave start info flags(9)NE_ENCLAVE_PRODUCTION_MODE(9)NE_ENCLAVE_DEBUG_MODE(9)struct ne_enclave_start_info(9)
This iconic page lives at./include/uapi/linux, is dated October 2026, and goes byNE_START_ENCLAVE(9)β periodt. This page ate and left no crumbs, ngl. Go start those enclaves, bestie, and slay 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