Page MenuHomeFreeBSD

minidump: Use the provided dump bitset
AcceptedPublic

Authored by mhorne on Sep 16 2021, 6:40 PM.

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 41632
Build 38521: 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.

sys/amd64/amd64/pmap.c
4953 ↗(On Diff #95263)

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