Page MenuHomeFreeBSD

minidump: Use the provided dump bitset
ClosedPublic

Authored by mhorne on Sep 16 2021, 6:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 21, 11:27 PM
Unknown Object (File)
Mar 11 2024, 11:22 PM
Unknown Object (File)
Feb 18 2024, 8:25 AM
Unknown Object (File)
Jan 12 2024, 1:48 PM
Unknown Object (File)
Jan 8 2024, 1:17 AM
Unknown Object (File)
Dec 23 2023, 2:53 AM
Unknown Object (File)
Dec 17 2023, 7:04 PM
Unknown Object (File)
Dec 12 2023, 12:00 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 Passed
Unit
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.

sys/amd64/amd64/pmap.c
4953

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.