get_dump_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– get_dump_page β€” the kernel API manual, but make it make sense πŸ’–

okay so bestie, welcome to the get_dump_page(9) page πŸ’… this one lives in the Kernel API Manual, section 9 β€” we're in kernel-dev territory now, no cap.


✨ NAME ✨

get_dump_page β€” pin a user page in memory while you're writing it out to a core dump 🫢


🌸 SYNOPSIS 🌸

struct page * get_dump_page (unsigned long addr , int *locked );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • addr β€” the user address. literally the address, that's the whole vibe πŸ“
  • locked β€” a pointer to an int that says whether the mmap sem is held πŸ‘€

πŸŽ€ DESCRIPTION πŸŽ€

So this one returns a struct page pointer for a user page that's pinned for the dump β€” and when you're done with it, you free it afterwards with put_page 🧚

It returns NULL on any kind of failure β€” and when that happens you must insert a hole into the corefile, because you gotta preserve alignment with its headers, fr fr. It also returns NULL wherever the ZERO_PAGE has been found, or an anonymous pte_none β€” which is actually a slay, because that lets you leave a hole in the corefile and save disk space 🌈

ngl it's called without mmap_lock β€” it takes and releases the mmap_lock by itself, main character energy, it handles its own business πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

All these icons live in the kernel file ./mm/gup.c πŸ”₯


and that's the whole page, bestie, you ate that πŸ“ this cutie came out of ./mm, dated October 2026, and it's from the Kernel API Manual, section 9 β€” that's get_dump_page(9) for the group chat πŸ’œ mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from