Page MenuHomeFreeBSD

minidump: Use the provided dump bitset

Authored by mhorne on Sep 16 2021, 6:40 PM.
Referenced Files
Unknown Object (File)
Sun, Oct 1, 10:13 AM
Unknown Object (File)
Sep 1 2023, 10:59 PM
Unknown Object (File)
Aug 25 2023, 4:24 AM
Unknown Object (File)
Aug 14 2023, 3:34 PM
Unknown Object (File)
Aug 14 2023, 2:45 AM
Unknown Object (File)
Aug 6 2023, 10:26 PM
Unknown Object (File)
Aug 6 2023, 10:25 PM
Unknown Object (File)
Aug 6 2023, 10:24 PM



When constructing the set of dumpable pages, use the bitset provided by
the state argument, rather than assuming vm_page_dump invariably. For
normal kernel minidumps this will be a pointer to vm_page_dump, but when
dumping the live system it will not.

To do this, the functions in vm_dumpset.h are extended to accept the
desired bitset as an argument. Note that this provided bitset is assumed
to be derived from vm_page_dump, and therefore has the same size.

Diff Detail

rS FreeBSD src repository - subversion
Lint Passed
No Test Coverage
Build Status
Buildable 41550
Build 38439: arc lint + arc unit

Event Timeline

This is mostly mechanical. state->dump_bitset should be used inside each minidump_machdep.c, and vm_page_dump everywhere else. The one exception to this is powerpc's dumpsys_scan_pmap() method, which is extended to also accept a bitset argument.


I think it'd be better to provide a helper which fixes the vm_page_dump parameter. e.g., rename dump_add_page() to vm_page_dump_add() and make have dump_add_page() just be vm_page_dump_add(vm_page_dump, pa). It feels a bit silly to force all of the interface consumers outside of minidumpsys() to specify the global context which exists solely for the minidumpsys() implementation.

Add helpers to eliminate code churn outside of minidump_machdep.c.

This revision is now accepted and ready to land.Sep 22 2021, 7:30 PM
This revision was automatically updated to reflect the committed changes.