diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-06-27 17:22:16 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-06-27 17:22:16 +0000 |
commit | b82fbdc955e28dbc283c3e684c2c5fb74062fd64 (patch) | |
tree | daee66f5d61f2e526a1f445bbcd2af66424f1586 /sys/arch/aviion | |
parent | 46f96006f3144b101718f66167782f21ef4ab938 (diff) |
Clear swap encryption keys before dumping a kernel image.
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r-- | sys/arch/aviion/aviion/machdep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index b48219c384d..142466997ba 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.24 2008/04/09 16:58:10 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.25 2008/06/27 17:22:14 miod Exp $ */ /* * Copyright (c) 2007 Miodrag Vallat. * @@ -14,7 +14,7 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -/* $OpenBSD: machdep.c,v 1.24 2008/04/09 16:58:10 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.25 2008/06/27 17:22:14 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -104,6 +104,7 @@ #include <dev/cons.h> #include <uvm/uvm_extern.h> +#include <uvm/uvm_swap.h> #include "ksyms.h" #if DDB @@ -510,6 +511,10 @@ dumpsys() printf("\ndumping to dev %u,%u offset %ld\n", maj, minor(dumpdev), dumplo); +#ifdef UVM_SWAP_ENCRYPT + uvm_swap_finicrypt_all(); +#endif + /* Setup the dump header */ kseg_p = (kcore_seg_t *)dump_hdr; chdr_p = (cpu_kcore_hdr_t *)&dump_hdr[ALIGN(sizeof(*kseg_p))]; |