STRUCT VMCORE_CB(9)
π struct vmcore_cb(9) π
okay so bestie, welcome to the Kernel API Manual β today's main character is struct vmcore_cb, and it's literally the driver callback squad for /proc/vmcore handling π like if you're a driver managing physical memory ranges and you need to talk to the vmcore handling code, this is your girl. periodt.
β¨ NAME β¨
struct vmcore_cb β driver callbacks for /proc/vmcore handling π¦
πΈ SYNOPSIS πΈ
struct vmcore_cb {
bool (*pfn_is_ram)(struct vmcore_cb *cb, unsigned long pfn);
int (*get_device_ram)(struct vmcore_cb *cb, struct list_head *list);
struct list_head next;
};
π Members π
pfn_is_ramβ this one's job is to check whether a PFN really is RAM and actually should be accessed when reading the vmcore π. It returnstrueif it is RAM, or if the callback genuinely can't tell. But if any callback returnsfalse, then nope β it's not RAM and the page must not be accessed; instead, zeroes should be indicated in the vmcore. Fr fr, think about it: a ballooned page contains no data, and reading from such a page will cause high load in the hypervisor π so yeah, don't do that.get_device_ramβ this one queries RAM ranges that can only be detected by device drivers, like thevirtio-memdriver, so they can be included in the crash dump on architectures that allocate the elfcore hdr in the dump ("2nd") kernel π. And here's the tea: the indicated RAM ranges may contain holes to reduce the total number of ranges β those holes can be detected using thepfn_is_ramcallback, just like for other RAM β¨.nextβ list head to manage registered callbacks internally; it gets initialized byregister_vmcore_cbπ«Ά.
π Description π
vmcore callbacks allow drivers managing physical memory ranges to coordinate with vmcore handling code β for example, to prevent accessing physical memory ranges that should not be accessed when reading the vmcore, even though they're included in the vmcore header as memory ranges to dump π¦. it's giving teamwork, it's giving "don't touch that memory", iconic behavior honestly.
β SEE ALSO β
Kernel file ./include/linux/crash_dump.h π
ngl bestie, ifpfn_is_ramsaysfalse, that page is off-limits β zeroes in the vmcore only, no exceptions π
and that's a wrap, mwah π β this page came from ./include/linux, dated October 2026, and it's struct vmcore_cb(9) in the Kernel API Manual. slay π§ββοΈπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms