__sgx_alloc_epc_page(9)
πΈ __sgx_alloc_epc_page β like, the kernel API manual, section 9, bestie β¨
okay so real talk: this is a Kernel API Manual page, section 9, and the star of the show is __sgx_alloc_epc_page. it's the little function that grabs you an EPC page, and yes we're gonna walk through it together π«Ά
β¨ NAME β¨
__sgx_alloc_epc_page β allocate an EPC page π
π SYNOPSIS π
struct sgx_epc_page * __sgx_alloc_epc_page (void );
π¦ ARGUMENTS π¦
voidβ no arguments. that's it. zero. nothing. it takes nobody's input, main character energy only π
π DESCRIPTION π
so what it actually does: it iterates through NUMA nodes and reserves a free EPC page for the caller. cute, right?
and here's the lil detail that matters β it starts from the NUMA node where the caller is executing π§ so it's locality-aware, lowkey thoughtful of it.
π₯ RETURN π₯
- an EPC page β a borrowed EPC page was available, so congrats, you got one β
NULLβ out of EPC pages π that's the sad-path vibe check fail
π SEE ALSO π
kernel file: ./arch/x86/kernel/cpu/sgx/main.c
sgx_mark_page_reclaimable(9)sgx_unmark_page_reclaimable(9)sgx_alloc_epc_page(9)sgx_free_epc_page(9)sgx_set_attribute(9)sgx_update_svn(9)
ngl, if you get NULL back, don't come crying to me β the EPC pages are just gone, bestie π
okay and finally, the sign-off π this one lives in ./arch/x86/kernel/cpu/sgx, and it's dated October 2026. periodt. go read the source, ily, 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