kmsan_poison_memory(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ 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 🌈

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