kmsan_free_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– kmsan_free_page β€” like, the KMSAN heads-up for a free_pages() call

okay so this is kmsan_free_page, straight out of the Kernel API Manual (section 9, kernel-flavored, iykyk) β€” and bestie, it's a tiny little function with one very specific job and I'm obsessed with how unbothered it is πŸ’…


✨ SYNOPSIS ✨

void kmsan_free_page (struct page *page , unsigned int order );

that's it. that's the whole signature. she's short, she's sweet, she returns void because she has nothing to say back to you πŸŽ€


🌸 ARGUMENTS 🌸

  • page β€” a struct page pointer, and it's literally the exact same one that got passed to free_pages. no sneaky substitution, just hand her the same pointer, bestie 🫢
  • order β€” the order of the deallocated struct page. yes, the order. give her the number, she needs the number πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: KMSAN marks freed memory as uninitialized. that's it. that's the whole personality 🌈

like, not me explaining it in one sentence 😭 β€” she's a notifier, she tells KMSAN "hey girl, this page just got freed," and KMSAN goes "say less" and marks that memory as uninitialized. main character energy, no cap ✨


πŸ‘‘ SEE ALSO πŸ‘‘

the whole KMSAN friend group, fr fr β€” they all live in the kernel file ./include/linux/kmsan.h:

like, the entire group chat πŸ’€ go read them, they ate πŸ“


ngl the whole ./include/linux directory is where the lore lives β€” that's the source location, and this page is dated October 2026 ⭐

and that's the page, bestie β€” slay, periodt, go free some pages responsibly πŸ§šπŸ’œ

πŸ“¦ where this page comes from