sgx_enclave_user_handler_t(9)
β¨ NAME β¨
okay so bestie, this is sgx_enclave_user_handler_t(9) from the Kernel API Manual π β it's the exit handler function that __vdso_sgx_enter_enclave() accepts. literally the callback for enclave exits, and it's giving main character energy β¨
π SYNOPSIS π
int sgx_enclave_user_handler_t (long rdi , long rsi , long rdx , long rsp , long r8 , long r9 , struct sgx_enclave_run *run );
π ARGUMENTS π
here's the lineup, bestie:
rdiβRDIat the time ofEEXIT; undefined onAEX, so don't trust it πrsiβRSIat the time ofEEXIT; undefined onAEX, same vibe πrdxβRDXat the time ofEEXIT; undefined onAEX, fr frrspβRSP(untrusted) at the time ofEEXITorAEXβ that "untrusted" is important, bestie πr8βR8at the time ofEEXIT; undefined onAEX, nglr9βR9at the time ofEEXIT; undefined onAEX, lowkeyrunβ the run instance given by the caller π«Ά
π₯ DESCRIPTION π₯
the register parameters contain the snapshot of their values at enclave exit. that's the whole point, and it's iconic β¨
if the ENCLU function number is invalid, -EINVAL will be returned to the caller. periodt.
π RETURN π
vibe check on the return value:
<= 0β the given value is returned back to the caller π> 0β this is theENCLUfunction to invoke, eitherEENTERorERESUMEπ₯
π¦ SEE ALSO π¦
the kernel file is ./arch/x86/include/uapi/asm/sgx.h, and these are the related pages you should also peek at:
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_restrict_permissions(9)struct sgx_enclave_modify_types(9)struct sgx_enclave_remove_pages(9)struct sgx_enclave_run(9)vdso_sgx_enter_enclave_t(9)
mwah π that's the page! source/version: ./arch/x86/include/uapi/asm, date: October 2026, and yes, it's still the sgx_enclave_user_handler_t(9) manual page, bestie. πΈ
π¦ 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