kasan_poison(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ kasan_poison(9) β€” Kernel API Manual πŸŽ€

✨ NAME ✨

kasan_poison β€” mark the memory range as inaccessible. that's the whole vibe: it's the function that slaps the β€œnope, not accessible” label on a memory range, and honestly? iconic. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so the signature is literally this, bestie β€” copy it exactly:

void kasan_poison (const void *addr , size_t size , u8 value , bool init
);

🌸 ARGUMENTS 🌸

  • addr β€” range start address, and it must be aligned to KASAN_GRANULE_SIZE. no cap, alignment is not optional here.
  • size β€” range size, and it must be aligned to KASAN_GRANULE_SIZE. same energy as addr, fr fr.
  • value β€” value that's written to metadata for the range. that's the exact tea. πŸ“
  • init β€” whether to initialize the memory range (only for hardware tag-based). yes, that parenthetical is part of the lore. ✨

🌈 SEE ALSO 🌈

Kernel file ./mm/kasan/kasan.h is right there in the mix, plus the besties kasan_check_range(9), kasan_unpoison(9), and kasan_poison_last_granule(9). iykyk πŸ‘‘


okay that's the whole page, ily β€” source/version ./mm/kasan, date October 2026, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from