HomeFreeBSD

dumpon: use underlying device if encrypted swap is in use

Description

dumpon: use underlying device if encrypted swap is in use

/etc/rc.d/dumpon runs before /etc/rc.d/swap. When encrypted swap is in
use the .eli or .bde device will not exist at the time dumpon runs.

Even if this is addressed it does not make sense to dump core to
encrypted swap, as the encryption key will not be available after
reboot rendering the dump useless. Thus, for the case that dumpdev=AUTO
and encrypted swap is in use, strip the extension and use the underlying
device.

Emit a warning if we are using the underlying device and the user has not
configured dump encryption, so that the user knows that the will not be
encrypted.

PR: 238301
Reported by: Ivan Rozhuk
Reviewed by: jilles
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34474

Details

Provenance
emasteAuthored on Mar 7 2022, 7:17 PM
Reviewer
jilles
Differential Revision
D34474: dumpon: use underlying device if encrypted swap is in use
Parents
rGf1d450ddee66: bhyve: Remove VM_MAXCPU from the userspace API/ABI.
Branches
Unknown
Tags
Unknown