sgx_encl_te..._clear_young(9)
π sgx_encl_test_and_clear_young β a Kernel API Manual moment (section 9, bestie)
okay so this is sgx_encl_test_and_clear_young(9) from the Kernel API Manual, and honestly? she's a little function with one job and she does it. no notes. β¨
β¨ NAME β¨
sgx_encl_test_and_clear_young β literally just, like, test the accessed bit and then reset it. that's the whole vibe check. π«Ά
πΈ SYNOPSIS πΈ
int sgx_encl_test_and_clear_young (struct mm_struct *mm , struct
sgx_encl_page *page );
like yes she takes two args and returns an int, we been knew π
π ARGUMENTS π
mmβ themm_structthat gets checked. she's the one being looked at, ok? eyes on her πpageβ the enclave page that's getting tested for recent access. is she fresh or is she not, that's the question π¦
π DESCRIPTION π
so what she does is: she checks the Access (A) bit from the PTE that corresponds to the enclave page β and then she clears it. yes, both. check it, then clear it. iconic behaviour honestly. not me reading the bit and then immediately wiping it π that's just her process.
β RETURN β
1β the page has been recently accessed (she was there, she was seen, main character energy π)0β not recently accessed. it's giving untouched. it's giving neglected. π
π₯ SEE ALSO π₯
the kernel file herself: ./arch/x86/kernel/cpu/sgx/encl.c
and the whole friend group, fr fr β go say hi to all of them:
reclaimer_writing_to_pcmd(9)sgx_encl_eaug_page(9)sgx_encl_may_map(9)sgx_encl_release(9)sgx_encl_cpumask(9)__sgx_encl_get_backing(9)sgx_encl_alloc_backing(9)sgx_encl_lookup_backing(9)sgx_encl_put_backing(9)sgx_zap_enclave_ptes(9)sgx_alloc_va_page(9)sgx_alloc_va_slot(9)sgx_free_va_slot(9)sgx_va_page_full(9)sgx_encl_free_epc_page(9)
lowkey if you're reading this whole list you're a real one. iykyk π§
π bye bestie π
that's the page!! it lives in ./arch/x86/kernel/cpu/sgx, it's dated October 2026, and yes the version tag is literally sgx_encl_te..._clear_young(9) because even manpage footers get to be a little mysterious. slay, go forth and test-and-clear, periodt πβ¨
π¦ 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