kfence_object_start(9)
π kfence_object_start β ok so where does this KFENCE object actually start? π
Bestie, you're reading the kfence_object_start(9) page from the Kernel API Manual, and it's a short one but it's lowkey crucial, so stay with me π«Ά
β¨ NAME β¨
kfence_object_start β find the beginning of a KFENCE object πΈ
π SYNOPSIS π
void * kfence_object_start (const void *addr );
π¦ ARGUMENTS π¦
addrβ an address that lives inside a KFENCE-allocated object. Like, somewhere in there. You don't need it to be the start, that's literally the whole point π
β RETURN β
It hands you back the address of the beginning of the object. The actual start. The main character position π
π DESCRIPTION π
Okay so here's the tea β β SL[AU]B-allocated objects are laid out within a page one by one, so it's easy peasy to calculate the beginning of an object given a pointer inside it and the object size. Math, but like, chill math.
The same is not true for KFENCE π KFENCE places a single object at either end of the page β like, either the front or the back, no in-between, it's giving dramatic entrances only.
So this helper function exists to find the beginning of a KFENCE-allocated object, because you genuinely cannot just do the arithmetic yourself. That's the vibe. That's the job. Slay π§
π₯ SEE ALSO π₯
- Kernel file
./include/linux/kfence.hβ the header itself, go read it iykyk π is_kfence_address(9)kfence_alloc_pool_and_metadata(9)kfence_init(9)kfence_shutdown_cache(9)kfence_alloc(9)kfence_ksize(9)__kfence_free(9)kfence_free(9)kfence_handle_page_fault(9)__kfence_obj_info(9)
Bestie reminder: that's the whole friend group up there, so if you're poking at KFENCE stuff you're gonna want all of them in your tabs π
And that's the page!! π No cap, it's a tiny one. This came to you from ./include/linux, dated October 2026, under the handle kfence_object_start(9) β mwah, bye bestie, go find those object starts ππβ¨
π¦ 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