__encls_N(9)
π __encls_N β okay so this is the ENCLS encoder for the no-error-code girlies
bestie. welcome to section 9 of the Kernel API Manual, aka the kernel-manpage section, aka where the macro lore lives. today we're talking about __encls_N β a macro that encodes an ENCLS function that doesn't return an error code. that's the whole vibe. no error code, no drama, periodt. β¨
π SYNOPSIS π
__encls_N (rax , rbx_out , inputs... );
like, look at her. three little slots and she's done. iconic.
πΈ ARGUMENTS πΈ
raxβ the function number. which ENCLS function are we even doing here. that one. π«Άrbx_outβ an optional output variable. only if you need it, no pressure.inputsβ the asm inputs for the function. feed her.
π¦ DESCRIPTION π¦
okay so what she actually does: she emits assembly for an ENCLS function that does not return an error code β think ECREATE, that kind of energy. π
and here's the key thing, the part you cannot skip: leaves without error codes either succeed or fault. there's no in-between, no "oops here's a return value", none of that. it works or it traps. main character behaviour fr fr.
rbx_out is an optional parameter for use by EDGBRD, which returns the requested value in RBX. so if you're the EDGBRD girlie, that's your slot. iykyk. π§
β RETURN β
0on success πtrapnrwithSGX_ENCLS_FAULT_FLAGset on fault π
like i said. succeed or fault. no cap.
π SEE ALSO π
- Kernel file
./arch/x86/kernel/cpu/sgx/encls.h encls_failed(9)__encls_ret_N(9)
lowkey reminder bestie: if it faults you're getting a trapnr back with SGX_ENCLS_FAULT_FLAG set, so check that flag before you assume anything. π«Ά
mwah π that's the page! this little love letter lives in the kernel source tree at ./arch/x86/kernel/cpu/sgx, and it's dated October 2026 β so yeah, she's from the future and she's still serving __encls_N(9). go forth and encode, queen πβ¨
π¦ 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