kmem_dump_obj(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kmem_dump_obj β€” kernel API manual, section 9, bestie

okay so real talk, this page is from the Kernel API Manual, section 9, and it's about kmem_dump_obj(9). yes the function and the manpage have the same name, that's just how kernel docs roll, we don't question it πŸŽ€


✨ NAME ✨

kmem_dump_obj β€” print whatever slab provenance info we've got on hand, no cap


πŸ¦‹ SYNOPSIS πŸ¦‹

bool kmem_dump_obj (void *object );

🌸 ARGUMENTS 🌸

  • object β€” the slab object you're trying to get provenance info for. that's the whole assignment bestie, hand over the pointer πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

so here's the vibe: this function uses pr_cont, which means it does not start a fresh line for you. the caller is expected to have already printed out whatever preamble makes sense in context. like, you set the stage, kmem_dump_obj just keeps the sentence going. main character energy but it needs a co-star 🫢

the provenance info you actually get depends on the type of object and on how much debugging is enabled. so it's giving "results may vary" but in a kernel way.

for a slab-cache object specifically: it prints the fact that it is a slab object (iconic, we love confirmation), and then, if available, the slab name, the return address, and the stack trace from the allocation and last free path of that object. so basically the object's whole life story, receipts included πŸ“œβœ¨


⭐ RETURN ⭐

  • true β€” if the pointer is to a not-yet-freed object from kmalloc or kmem_cache_alloc
  • either true or false β€” if the pointer is to an already-freed object (yeah, it's ambiguous, that's literally what the page says, don't come for me 😭)
  • false β€” otherwise

🧚 SEE ALSO 🧚

go read them, they're all in the group chat already πŸ’–


πŸŽ€ sign-off πŸŽ€

that's the whole page babes β€” it lives over in ./mm, dated October 2026, and the title/name on the tin is kmem_dump_obj(9). stay slay, go dump some objects responsibly πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from