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/i386 | |
parent | 46f96006f3144b101718f66167782f21ef4ab938 (diff) |
Clear swap encryption keys before dumping a kernel image.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index df6bd428692..25a34b88312 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.432 2008/06/26 05:42:10 ray Exp $ */ +/* $OpenBSD: machdep.c,v 1.433 2008/06/27 17:22:14 miod Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -103,6 +103,7 @@ #include <stand/boot/bootarg.h> #include <uvm/uvm_extern.h> +#include <uvm/uvm_swap.h> #define _I386_BUS_DMA_PRIVATE #include <machine/bus.h> @@ -2544,6 +2545,10 @@ dumpsys() return; printf("\ndumping to dev %x, offset %ld\n", dumpdev, dumplo); +#ifdef UVM_SWAP_ENCRYPT + uvm_swap_finicrypt_all(); +#endif + error = (*bdevsw[major(dumpdev)].d_psize)(dumpdev); printf("dump "); if (error == -1) { |