kmsan_get_metadata(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kmsan_get_metadata β€” like, the Kernel API Manual page you didn't know you needed 🫢

Okay so bestie, welcome to kmsan_get_metadata(9), straight out of the Kernel API Manual. Lowkey this one is short but it's iconic β€” it's the little pointer-fetcher for KMSAN's shadow and origins. Let's get into it ✨


✨ NAME ✨

kmsan_get_metadata β€” returns a pointer to the KMSAN shadow or the origins. That's it. That's the whole job. She's a one-trick pony and she ate πŸ’…


🌸 SYNOPSIS 🌸

void * kmsan_get_metadata (void *addr , bool is_origin );

Look at her. Two args, one pointer back. Obsessed with the efficiency honestly πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • addr β€” a kernel address. Just a kernel address, sitting there, being a kernel address πŸ¦‹
  • is_origin β€” the vibe selector: do you want the origins back, or the shadow? You literally have to pick one, bestie, no cap 🌈

πŸ’œ DESCRIPTION πŸ’œ

So the whole deal here: if the metadata can't be found, it returns NULL. That's it. That's the description. Not me expecting a whole essay 😭 β€” the original said it in one line and we're keeping it in one line, fr fr. No guessing, no extra lore, no invented behaviour. NULL = not found. Periodt πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Okay this is where it gets good β€” the whole KMSAN friend group shows up. Kernel file ./include/linux/kmsan.h plus:

Twenty-one besties and every single one of them is a whole personality. Go read them all, iykyk πŸ‘‘


πŸŽ€ Sourced from ./include/linux, dated October 2026, page kmsan_get_metadata(9). That's the footer, bestie β€” now you have the receipts πŸ§šπŸ’œ
πŸ“¦ where this page comes from