kasan_mempoo...poison_pages(9)
π kasan_mempool_unpoison_pages(9) β from the Kernel API Manual, bestie β¨
okay so picture this: it's the Kernel API Manual, the function is kasan_mempool_unpoison_pages, and you're about to understand it. we're doing this together, no cap π«Ά
πΈ NAME πΈ
kasan_mempool_unpoison_pages β literally unpoisons a mempool page allocation. that's the whole vibe. π
β¨ SYNOPSIS β¨
void kasan_mempool_unpoison_pages (struct page *page , unsigned int
order );
yep, that's it, that's the whole signature. copy it exact, don't get creative with the semicolons, i'm begging π
π ARGUMENTS π
pageβ a pointer to the page allocation. like, the actual pages we're talking about here. main character energy πorderβ the order of the allocation. it's aunsigned intand it's telling you the size/shape of what we're working with, bestie π¦
π§ DESCRIPTION π§
so this function is intended for kernel subsystems that cache page allocations so they can reuse them instead of freeing them back to page_alloc β like, for example, mempool. it's giving "i have a stash and i'm not giving it up" π
what it actually does: it unpoisons a page allocation that was previously poisoned by kasan_mempool_poison_pages, and it does this without zeroing the allocation's memory. read that again. no zeroing. the memory is untouched. periodt π₯
and for the tag-based modes, this function assigns a new tag to the allocation. fresh tag, fresh me, slay π
ngl this is the kind of function that only makes sense if you already know the poisoning system, but the details are the details and i refuse to drop a single one π
β SEE ALSO β
- Kernel file
./include/linux/kasan.hβ iconic header, go read it kasan_unpoison_new_object(9)kasan_poison_new_object(9)kasan_slab_pre_free(9)kasan_slab_free(9)kasan_mempool_poison_pages(9)β the one that poisoned it in the first place, we love a prequelkasan_mempool_poison_object(9)kasan_mempool_unpoison_object(9)kasan_report(9)
and that's the page!! π this whole thing lives in ./include/linux, it's dated October 2026, and it's filed under kasan_mempoo...poison_pages(9) (yes the truncation is real, yes it bugs me too, no i can't fix it π). bye bestie, go poison responsibly π
π¦ 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