kmsan_poison_memory(9)
π kmsan_poison_memory π
Okay so we're in the Kernel API Manual bestie, and this page is about kmsan_poison_memory β the little function that tells KMSAN "hey, this chunk of memory? not initialized, don't trust it." Iconic behavior honestly.
β¨ NAME β¨
kmsan_poison_memory β mark the memory range as uninitialized π
πΈ SYNOPSIS πΈ
void kmsan_poison_memory (const void *address , size_t size , gfp_t flags );
π ARGUMENTS π
addressβ the address to start with. like, where the poisoning begins π«Άsizeβ size of the buffer to poison. how much we're hitting with the uninit beam β¨flagsβ GFP flags for allocations done by this function. yes, this function does its own allocations, and these are the flags it gets π
π¦ DESCRIPTION π¦
Until other data gets written to this range, KMSAN will treat it as uninitialized. Periodt.
And the way that error reports for this memory will reference the call site of kmsan_poison_memory as the origin? Obsessed. So when something goes wrong later, the report points its little finger right back at whoever called this π
π SEE ALSO π
- Kernel file
./include/linux/kmsan-checks.h kmsan_unpoison_memory(9)kmsan_check_memory(9)kmsan_copy_to_user(9)kmsan_memmove(9)
all the sibling functions fr fr, go read those too π§
ngl this one is short and sweet, but it's doing real work. use it responsibly bestie π
mwah π that's the whole page! This lil number lives in ./include/linux, and it's serving October 2026 energy β same kmsan_poison_memory(9) you know and love, just cuter π π π
π¦ 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