From b82fbdc955e28dbc283c3e684c2c5fb74062fd64 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 27 Jun 2008 17:22:16 +0000 Subject: Clear swap encryption keys before dumping a kernel image. --- sys/arch/aviion/aviion/machdep.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/arch/aviion') 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 #include +#include #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))]; -- cgit v1.2.3