History log of /freebsd-current/sbin/dumpon/dumpon.8
Revision Date Author Comments
# 51e16cb8 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sbin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# b2c76c41 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


# 3c405c7e 17-Aug-2022 Jens Schweikhardt <schweikh@FreeBSD.org>

Indicate which port gdb.1 and kgdb.1 come from.


# af06ff55 07-Mar-2021 Mark Johnston <markj@FreeBSD.org>

dumpon.8: Ask DDB to call doadump() rather than calling it directly

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# e5a84dc8 28-Dec-2020 Gordon Bergling <gbe@FreeBSD.org>

dumpon(8): Add missing section arguments

MFC after: 3 days


# 7575e5c4 23-Apr-2020 Conrad Meyer <cem@FreeBSD.org>

dumpon.8: Update minimum key size language

dumpon(8) has not accepted 1024-bit RSA keys since prior to r339784 (2018-10).
The manual page language was not updated at that time (oops). The minimum
accepted is 2048 bits, which is also a good default choice.

Sponsored by: Dell EMC Isilon


# 82985292 23-May-2019 Conrad Meyer <cem@FreeBSD.org>

EKCD: Add Chacha20 encryption mode

Add Chacha20 mode to Encrypted Kernel Crash Dumps.

Chacha20 does not require messages to be multiples of block size, so it is
valid to use the cipher on non-block-sized messages without the explicit
padding AES-CBC would require. Therefore, allow use with simultaneous dump
compression. (Continue to disallow use of AES-CBC EKCD with compression.)

dumpon(8) gains a -C cipher flag to select between chacha and aes-cbc.
It defaults to chacha if no -C option is provided. The man page documents this
behavior.

Relnotes: sure
Sponsored by: Dell EMC Isilon


# 48faa24b 21-May-2019 Mark Johnston <markj@FreeBSD.org>

Update the example added in r348082 to specify a dump device priority.

Event: Waterloo Hackathon 2019


# 73cc1694 21-May-2019 Mark Johnston <markj@FreeBSD.org>

Provide an example of using dhclient-script(5) to configure netdump.

Reviewed by: cem
MFC after: 1 week
Event: Waterloo Hackathon 2019
Differential Revision: https://reviews.freebsd.org/D20345


# 6b6e2954 06-May-2019 Conrad Meyer <cem@FreeBSD.org>

List-ify kernel dump device configuration

Allow users to specify multiple dump configurations in a prioritized list.
This enables fallback to secondary device(s) if primary dump fails. E.g.,
one might configure a preference for netdump, but fallback to disk dump as a
second choice if netdump is unavailable.

This change does not list-ify netdump configuration, which is tracked
separately from ordinary disk dumps internally; only one netdump
configuration can be made at a time, for now. It also does not implement
IPv6 netdump.

savecore(8) is already capable of scanning and iterating multiple devices
from /etc/fstab or passed on the command line.

This change doesn't update the rc or loader variables 'dumpdev' in any way;
it can still be set to configure a single dump device, and rc.d/savecore
still uses it as a single device. Only dumpon(8) is updated to be able to
configure the more complicated configurations for now.

As part of revving the ABI, unify netdump and disk dump configuration ioctl
/ structure, and leave room for ipv6 netdump as a future possibility.
Backwards-compatibility ioctls are added to smooth ABI transition,
especially for developers who may not keep kernel and userspace perfectly
synced.

Reviewed by: markj, scottl (earlier version)
Relnotes: maybe
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D19996


# e5fff57d 17-Nov-2018 Mark Johnston <markj@FreeBSD.org>

Change dumpon(8)'s handling of -g.

Rather than using a special value to denote "use the default router",
treat the absence of the -g option to mean the same thing. The
in-kernel netdump client will always attempt to reach the server
directly before falling back to the configured gateway anyway. This
change makes it cleaner to support a hostname value for -g.

Reviewed by: cem
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D18025


# 0fb8835b 26-Oct-2018 Conrad Meyer <cem@FreeBSD.org>

dumpon.8: Significantly revamp page

Start with a short summary and cover the options in a standard list style.

Organize sections by common focus and prioritize more useful information
closer to the top.

Flesh out authors, history, caveats, and security considerations sections.

Reviewed by: markj, eadler (previous version)
Differential Revision: https://reviews.freebsd.org/D17679


# f27d255c 26-Oct-2018 Conrad Meyer <cem@FreeBSD.org>

dumpon(8): Provide seatbelt against weak RSA keys

The premise of dumpon -k foo.pem is that dump contents will be confidential
except to anyone holding the corresponding RSA private key.

This guarantee breaks down when weak RSA keys are used. Small RSA keys
(e.g. 512 bits) can be broken on a single personal computer in tractible
time. Marginal RSA keys (768 bits) can be broken by EC2 and a few dollars.
Even 1024 bit keys can probably be broken by sophisticated and wealthy
attackers.

NIST SP800-57 (2016) recommends a minimum of 2048 bit RSA keys, and
estimates this provides 112 bits of security.

It would also be good to protect users from weak values of 'e' (i.e., 3) and
perhaps sanity check that their public key .pem does not accidentally
contain their private key as well. These considerations are left as future
work.

Reviewed by: markj, darius AT dons.net.au (previous version)
Discussed with: bjk
Differential Revision: https://reviews.freebsd.org/D17678


# 3330a6d9 13-Jun-2018 Eitan Adler <eadler@FreeBSD.org>

dumpon(8): improve the examples a bit

While here, remove extraneous extraneous Pp

Reviewed by: jhb (older version)


# 6d6e62dc 23-May-2018 Eitan Adler <eadler@FreeBSD.org>

dumpon: point to better kernel debug symbols.

The objdir is temporary, and the current example points to GENERIC.
Instead point to the installed location of the debug symbols that are
supposed to match the kernel you are using.

PR: 223993
Submitted by: Trond.Endrestol@ximalas.info


# 0ff40d3d 05-May-2018 Mark Johnston <markj@FreeBSD.org>

Add netdump support to dumpon(8).

A new usage is added so that parameters for netdump may be specified.
Specifically, one configures an interface for netdump with:

# dumpon -c <client IP> -s <server IP> [-g <gateway IP>] <iface name>

Reviewed by: bdrewery, cem (earlier versions), sbruno
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15254


# 6026dcd7 13-Feb-2018 Mark Johnston <markj@FreeBSD.org>

Add support for zstd-compressed user and kernel core dumps.

This works similarly to the existing gzip compression support, but
zstd is typically faster and gives better compression ratios.

Support for this functionality must be configured by adding ZSTDIO to
one's kernel configuration file. dumpon(8)'s new -Z option is used to
configure zstd compression for kernel dumps. savecore(8) now recognizes
and saves zstd-compressed kernel dumps with a .zst extension.

Submitted by: cem (original version)
Relnotes: yes
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D13101,
https://reviews.freebsd.org/D13633


# 64a16434 24-Oct-2017 Mark Johnston <markj@FreeBSD.org>

Add support for compressed kernel dumps.

When using a kernel built with the GZIO config option, dumpon -z can be
used to configure gzip compression using the in-kernel copy of zlib.
This is useful on systems with large amounts of RAM, which require a
correspondingly large dump device. Recovery of compressed dumps is also
faster since fewer bytes need to be copied from the dump device.

Because we have no way of knowing the final size of a compressed dump
until it is written, the kernel will always attempt to dump when
compression is configured, regardless of the dump device size. If the
dump is aborted because we run out of space, an error is reported on
the console.

savecore(8) is modified to handle compressed dumps and save them to
vmcore.<index>.gz, as it does when given the -z option.

A new rc.conf variable, dumpon_flags, is added. Its value is added to
the boot-time dumpon(8) invocation that occurs when a dump device is
configured in rc.conf.

Reviewed by: cem (earlier version)
Discussed with: def, rgrimes
Relnotes: yes
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11723


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 480f31c2 10-Dec-2016 Konrad Witaszczyk <def@FreeBSD.org>

Add support for encrypted kernel crash dumps.

Changes include modifications in kernel crash dump routines, dumpon(8) and
savecore(8). A new tool called decryptcore(8) was added.

A new DIOCSKERNELDUMP I/O control was added to send a kernel crash dump
configuration in the diocskerneldump_arg structure to the kernel.
The old DIOCSKERNELDUMP I/O control was renamed to DIOCSKERNELDUMP_FREEBSD11 for
backward ABI compatibility.

dumpon(8) generates an one-time random symmetric key and encrypts it using
an RSA public key in capability mode. Currently only AES-256-CBC is supported
but EKCD was designed to implement support for other algorithms in the future.
The public key is chosen using the -k flag. The dumpon rc(8) script can do this
automatically during startup using the dumppubkey rc.conf(5) variable. Once the
keys are calculated dumpon sends them to the kernel via DIOCSKERNELDUMP I/O
control.

When the kernel receives the DIOCSKERNELDUMP I/O control it generates a random
IV and sets up the key schedule for the specified algorithm. Each time the
kernel tries to write a crash dump to the dump device, the IV is replaced by
a SHA-256 hash of the previous value. This is intended to make a possible
differential cryptanalysis harder since it is possible to write multiple crash
dumps without reboot by repeating the following commands:
# sysctl debug.kdb.enter=1
db> call doadump(0)
db> continue
# savecore

A kernel dump key consists of an algorithm identifier, an IV and an encrypted
symmetric key. The kernel dump key size is included in a kernel dump header.
The size is an unsigned 32-bit integer and it is aligned to a block size.
The header structure has 512 bytes to match the block size so it was required to
make a panic string 4 bytes shorter to add a new field to the header structure.
If the kernel dump key size in the header is nonzero it is assumed that the
kernel dump key is placed after the first header on the dump device and the core
dump is encrypted.

Separate functions were implemented to write the kernel dump header and the
kernel dump key as they need to be unencrypted. The dump_write function encrypts
data if the kernel was compiled with the EKCD option. Encrypted kernel textdumps
are not supported due to the way they are constructed which makes it impossible
to use the CBC mode for encryption. It should be also noted that textdumps don't
contain sensitive data by design as a user decides what information should be
dumped.

savecore(8) writes the kernel dump key to a key.# file if its size in the header
is nonzero. # is the number of the current core dump.

decryptcore(8) decrypts the core dump using a private RSA key and the kernel
dump key. This is performed by a child process in capability mode.
If the decryption was not successful the parent process removes a partially
decrypted core dump.

Description on how to encrypt crash dumps was added to the decryptcore(8),
dumpon(8), rc.conf(5) and savecore(8) manual pages.

EKCD was tested on amd64 using bhyve and i386, mipsel and sparc64 using QEMU.
The feature still has to be tested on arm and arm64 as it wasn't possible to run
FreeBSD due to the problems with QEMU emulation and lack of hardware.

Designed by: def, pjd
Reviewed by: cem, oshogbo, pjd
Partial review: delphij, emaste, jhb, kib
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D4712


# 0530a521 02-Oct-2016 Sevan Janiyan <sevan@FreeBSD.org>

dumpon(8) appears to be present in FreeBSD 2.0.5,
despite initial import of man page listed FreeBSD 2.1.

PR: 212445
Approved by: bcr (mentor)
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D8105


# a62c8c6a 07-Oct-2014 Andrey V. Elsukov <ae@FreeBSD.org>

Revert r156046. We support setting dumpdev via loader tunable again.
Also change default disk name to ada.

MFC after: 3 weeks


# 4684a6ef 30-Apr-2013 Joel Dahl <joel@FreeBSD.org>

Adapt to the fact that minidumps are now on by default.

PR: 177188


# 4a790edd 02-Nov-2012 Alfred Perlstein <alfred@FreeBSD.org>

Document that you can use -v along with -l.

Noticed by: pjd


# f6848434 01-Nov-2012 Alfred Perlstein <alfred@FreeBSD.org>

Add an option to display the current dump device via dumpon -l.

MFC after: 2 weeks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 3676d4b6 26-Feb-2006 Kris Kennaway <kris@FreeBSD.org>

It has not been possible to specify a dumpdev in loader.conf since 2002,
so don't raise false hopes here.


# 62aedb04 07-Jan-2006 Pav Lucistnik <pav@FreeBSD.org>

- Mention the size of the additional header

PR: docs/85867
Submitted by: dinoex
MFC after: 1 week


# 6087df9e 18-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Sort sections.


# c0046e26 03-Oct-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Verify that the specified device is at least as large as hw.physmem.


# 842ddc99 03-Oct-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Wrap some long lines (no content changes)


# b7050409 18-Jul-2004 Maxim Konovalov <maxim@FreeBSD.org>

`off' is a keyword, not a parameter name.

Obtained from: DragonFly


# 4c723140 09-Apr-2004 Mark Murray <markm@FreeBSD.org>

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp


# 8340d5bc 07-May-2003 Hiten Pandya <hmp@FreeBSD.org>

Bring the dumpon(8) man page closer to reality:

- dumpon utility has not used kern.dumpdev sysctl
since rev. 1.14 (sbin/dumpon/dumpon.c) when phk@
updated it to use the DIOCSKERNELDUMP ioctl [1]
- remove obsolete reference to sysctl(3)

While I am there, fix two style nits:

- use .Nm instead of `dumpon'
- change NOTES to IMPLEMENTATION NOTES, to bring
it in line with recommended section headings in
mdoc(7)

Original patch by: Martin Faxer <gmh003532brfmasthugget.se> [1]

PR: docs/39293
Approved and Reviewed by: des (mentor), re (scottl, bmah)


# ce66ddb7 21-Aug-2002 Tom Rhodes <trhodes@FreeBSD.org>

s/filesystem/file system/g as discussed on -developers


# 80c9c8be 13-Aug-2002 Ruslan Ermilov <ru@FreeBSD.org>

Improve wording even more.


# 6ff8114c 09-Jul-2002 Matthew Dillon <dillon@FreeBSD.org>

Replace the 'at least the amount of physical memory + 64K' with a better
explanation in regards to sizing the dump device.


# e1205e80 06-Jul-2002 Philippe Charnier <charnier@FreeBSD.org>

The .Nm utility


# 0042d709 09-Apr-2002 Tom Rhodes <trhodes@FreeBSD.org>

Update dumpon manual page to explain single/multi-user usability

PR: 36465
No Objections from: ru


# 21367f05 23-Jan-2002 Maxim Sobolev <sobomax@FreeBSD.org>

CG hard sentence breaks.

Submitted by: ru


# 65ab9c78 22-Jan-2002 Maxim Sobolev <sobomax@FreeBSD.org>

Don't use `you'.

Submitted by: ru


# dcd7d9b7 20-Jan-2002 Maxim Sobolev <sobomax@FreeBSD.org>

Allow dump device be configured as early as possible using loader(8) tunable.
This allows obtaining crash dumps from the panics occured during late stages
of kernel initialisation before system enters into single-user mode.

MFC after: 2 weeks


# 76c83512 28-Oct-2001 Nick Hibma <n_hibma@FreeBSD.org>

Typo.


# 7ebcc426 15-Jul-2001 Dima Dorfman <dd@FreeBSD.org>

Remove whitespace at EOL.


# 9fe48c6e 10-Jul-2001 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: removed HISTORY info from the .Os call.


# ed403116 14-Dec-2000 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: removed history info from the .Os FreeBSD call.


# 7c7fb079 20-Nov-2000 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: use the new features of the Nm macro.


# d9a9b8db 14-Jul-2000 Ben Smithurst <ben@FreeBSD.org>

* Clarify text on choosing a dump device
* Remove the text which states only devices with minor number 1 can be used
- this is no longer true.
* Mention that dumpon(8) cannot be used to capture dumps from panics during
kernel initialization.
* /dev/wd -> /dev/ad

PR: 19848
Submitted by: Udo Erdelhoff <ue@nathan.ruhr.de>
Reviewed by: sheldonh


# fd5075e5 28-Mar-2000 Sheldon Hearn <sheldonh@FreeBSD.org>

Back out the new advice introduced in the previous commit, which at
least one reviewer is now unhappy with, since it contains incomplete
and misleading advice that is not easy to correct.

The net effect of this commit and the previous commit is to simply
remove all discussion of setting dumpdev to catch crash dumps
prior to entering user mode.


# df586e92 28-Mar-2000 Sheldon Hearn <sheldonh@FreeBSD.org>

Update instructions for setting the dump device prior to multi-user
mode.

Reported by: dcs
Submitted by: asmodai


# 7f3dea24 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 25c03915 16-May-1999 Joseph Koshy <jkoshy@FreeBSD.org>

Use current names for swap devices.

PR: docs/11708
Submitted by: Matthew D. Fuller <fullermd@over-yonder.net>


# acd80190 31-Aug-1998 Wolfram Schneider <wosch@FreeBSD.org>

Sort cross references.


# 8f034b11 15-Jun-1998 Philippe Charnier <charnier@FreeBSD.org>

Capitalize at the start of sentence. Add rcsid. Remove unused #includes.
Use `dumpon' instead of argv[0].


# e44af4db 27-May-1998 Joseph Koshy <jkoshy@FreeBSD.org>

Correct manual page, based on feedback from Bruce Evans.

Reviewed by: Bruce Evans <bde@freebsd.org>


# bb556bcf 25-May-1998 Joseph Koshy <jkoshy@FreeBSD.org>

Manual page fix: add cross references, refer to ``dumpdev'' variable in
"/etc/rc.conf".

PR: 6117
Submitted by: Mark Mayo <mark@vmunix.com>


# c0ec1f37 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 85cf659a 22-Aug-1996 Mike Pritchard <mpp@FreeBSD.org>

Use the .Fx macro where appropriate.


# 4bd9ba3c 11-Feb-1996 Mike Pritchard <mpp@FreeBSD.org>

Fixed some minor formatting problems to silence manck some more.
Corrected some bogus cross references to man pages that we don't/won't
have and either deleted them, or found a more appropriate man page
that we do have. Various other minor changes to silence manck.

Manck is currently down to about 200 lines of errors, down from
the 500 - 600+ when I started all this.


# 83f9dfab 12-May-1995 Garrett Wollman <wollman@FreeBSD.org>

My utility to specify where you want crash dumps to go. More user
and kernel support to follow.