freebsd-dev/sys
Mitchell Horne 588ab3c774 Allow minidumps to be performed on the live system
Add a boolean parameter to minidumpsys(), to indicate a live dump. When
requested, take a snapshot of important global state, and pass this to
the machine-dependent minidump function. For now this includes the
kernel message buffer, and the bitset of pages to be dumped. Beyond
this, we don't take much action to protect the integrity of the dump
from changes in the running system.

A new function msgbuf_duplicate() is added for snapshotting the message
buffer. msgbuf_copy() is insufficient for this purpose since it marks
any new characters it finds as read.

For now, nothing can actually trigger a live minidump. A future patch
will add the mechanism for this. For simplicity and safety, live dumps
are disallowed for mips.

Reviewed by:	markj, jhb
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31993
2021-11-19 15:05:53 -04:00
..
amd64 minidump: Use the provided dump bitset 2021-11-19 15:05:52 -04:00
arm minidump: Use the provided dump bitset 2021-11-19 15:05:52 -04:00
arm64 minidump: Use the provided dump bitset 2021-11-19 15:05:52 -04:00
bsm Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9). 2021-08-05 23:20:42 +08:00
cam sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes 2021-11-13 11:20:14 +02:00
cddl Allow ddb and dtrace use the DMAP region on arm64 2021-10-01 11:27:33 +01:00
compat LinuxKPI: make bcd.h use libkern 2021-11-18 23:10:34 +00:00
conf kmod_syms.awk: fix removal of the export list from the symbol table 2021-11-18 15:56:24 +02:00
contrib zfs: merge openzfs/zfs@269b5dadc (master) into main 2021-11-17 09:39:40 +01:00
crypto aesni: Avoid a potential out-of-bounds load in AES_GCM_encrypt() 2021-11-16 13:30:22 -05:00
ddb Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
dev ixl(4): Fix a typo in a sysctl description 2021-11-19 19:59:28 +01:00
dts add rk3328 overlay for enabling analog sound 2021-11-13 11:09:23 +02:00
fs ext2fs: check for eh_depth in ext4_ext_check_header() 2021-11-18 09:54:42 -08:00
gdb
geom geom: Remove g_class.config 2021-11-18 23:17:07 -07:00
gnu
i386 minidump: Use the provided dump bitset 2021-11-19 15:05:52 -04:00
isa
kern Allow minidumps to be performed on the live system 2021-11-19 15:05:53 -04:00
kgssapi
libkern libkern: remove bcopy 2021-08-24 11:24:07 +00:00
mips Allow minidumps to be performed on the live system 2021-11-19 15:05:53 -04:00
modules Fix some modules to export more used symbols 2021-11-18 15:56:23 +02:00
net iflib_stop: drain rx tasks to prevent any data races 2021-11-19 10:00:38 +02:00
net80211 net80211: radiotap add another define 2021-11-18 14:59:04 +00:00
netgraph Add ETHER_ALIGN support to ng_device(4). 2021-11-14 13:37:41 +01:00
netinet cc_newreno(4): Fix a typo in a source code comment 2021-11-19 19:16:02 +01:00
netinet6 in6_rmx: remove unnecessary TCP includes 2021-11-18 00:54:29 -08:00
netipsec sctp: Remove now-unneeded mb_unmapped_to_ext() calls 2021-11-16 13:38:09 -05:00
netpfil ipfw: remove unnecessary TCP related includes 2021-11-18 00:54:28 -08:00
netsmb
nfs kernel: partially revert e9efb1125a15, default inet mask 2021-11-14 14:12:25 -06:00
nfsclient
nfsserver
nlm
ofed socket: De-duplicate SBLOCKWAIT() definitions 2021-09-14 09:01:32 -04:00
opencrypto ktls: Split encrypt vs decrypt OCF counters. 2021-11-16 09:58:52 -08:00
powerpc minidump: Use the provided dump bitset 2021-11-19 15:05:52 -04:00
riscv minidump: Use the provided dump bitset 2021-11-19 15:05:52 -04:00
rpc mbuf: Only allow extpg mbufs if the system has a direct map 2021-11-16 13:31:04 -05:00
security Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9). 2021-08-05 23:20:42 +08:00
sys Allow minidumps to be performed on the live system 2021-11-19 15:05:53 -04:00
teken
tests routing: add IPv6 fib validation procedure. 2021-08-16 23:04:01 +00:00
tools makesyscalls: make strip_abi_prefix more robust 2021-11-17 20:12:21 +00:00
ufs ffs_softdep: Fix a typo in a source code comment 2021-11-19 19:17:41 +01:00
vm minidump: Use the provided dump bitset 2021-11-19 15:05:52 -04:00
x86 minidump: Parameterize minidumpsys() 2021-11-19 15:05:52 -04:00
xdr
xen xen/privcmd: fix MMAP_RESOURCE ioctl to copy out results 2021-11-18 09:46:44 +01:00
Makefile