kfence_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– kfence_free(9) πŸ’–

okay so bestie, welcome to the kfence_free page from the Kernel API Manual β€” grab a lil snack, this one's short and sweet πŸ“


✨ NAME ✨

kfence_free β€” the "hey, maybe this is a KFENCE object?" release move, aka trying to hand an arbitrary heap object back to the KFENCE pool πŸŽ€


🌸 SYNOPSIS 🌸

bool kfence_free (void *addr );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • addr β€” the object you're trying to free, bestie. that's it. that's the whole vibe πŸ’…

⭐ RETURN ⭐

  • false β€” the object does not belong to the KFENCE pool, so it got ignored πŸ™ˆ
  • true β€” slay, the object was released to the KFENCE pool πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

Release a KFENCE object and mark it as freed ✨ May be called on any object β€” yes, literally any object, even the non-KFENCE ones β€” because it makes integrating the hooks into the allocator's free codepath way simpler 🫢

But listen: the allocator must check the return value to figure out whether it was a KFENCE object or not. no skipping the vibe check, fr fr πŸ”₯


🌈 SEE ALSO 🌈


and that's the whole page, icon periodt πŸ’…βœ¨ this lil gem lives over in ./include/linux and it's dated October 2026 β€” go read the whole kfence family, they're giving main character energy πŸ‘‘πŸ’–

πŸ“¦ where this page comes from