]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add new vnode dumper to support live minidumps
authorMitchell Horne <mhorne@FreeBSD.org>
Tue, 23 Mar 2021 20:47:14 +0000 (17:47 -0300)
committerMitchell Horne <mhorne@FreeBSD.org>
Tue, 5 Apr 2022 18:35:05 +0000 (15:35 -0300)
commitc9114f9f86f92742eacd1d802c34009a57e81055
treeb28afb903672a8880b40e9a0a9f2196f5de6cfee
parent59c27ea18c32f5db2c2f9e8213b3ed4219e70704
Add new vnode dumper to support live minidumps

This dumper can instantiate and write the dump's contents to a
file-backed vnode.

Unlike existing disk or network dumpers, the vnode dumper should not be
invoked during a system panic, and therefore is not added to the global
dumper_configs list. Instead, the vnode dumper is constructed ad-hoc
when a live dump is requested using the new ioctl on /dev/mem. This is
similar in spirit to a kgdb session against the live system via
/dev/mem.

As described briefly in the mem(4) man page, live dumps are not
guaranteed to result in a usuable output file, but offer some debugging
value where forcefully panicing a system to dump its memory is not
desirable/feasible.

A future change to savecore(8) will add an option to save a live dump.

Reviewed by: markj, Pau Amma <pauamma@gundo.com> (manpages)
Discussed with: kib
MFC after: 3 weeks
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D33813
share/man/man4/mem.4
sys/conf/files
sys/dev/mem/memdev.c
sys/kern/kern_shutdown.c
sys/kern/kern_vnodedumper.c [new file with mode: 0644]
sys/sys/conf.h
sys/sys/kerneldump.h
sys/sys/memrange.h