summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-06-27 17:22:16 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-06-27 17:22:16 +0000
commitb82fbdc955e28dbc283c3e684c2c5fb74062fd64 (patch)
treedaee66f5d61f2e526a1f445bbcd2af66424f1586 /sys/arch/alpha
parent46f96006f3144b101718f66167782f21ef4ab938 (diff)
Clear swap encryption keys before dumping a kernel image.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/machdep.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index df447799fbf..f6536464908 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.115 2008/06/26 05:42:08 ray Exp $ */
+/* $OpenBSD: machdep.c,v 1.116 2008/06/27 17:22:12 miod Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -79,6 +79,7 @@
#include <sys/exec.h>
#include <sys/exec_ecoff.h>
#include <uvm/uvm_extern.h>
+#include <uvm/uvm_swap.h>
#include <sys/sysctl.h>
#include <sys/core.h>
#include <sys/kcore.h>
@@ -1255,6 +1256,10 @@ dumpsys()
printf("\ndumping to dev %u,%u offset %ld\n", major(dumpdev),
minor(dumpdev), dumplo);
+#ifdef UVM_SWAP_ENCRYPT
+ uvm_swap_finicrypt_all();
+#endif
+
psize = (*bdevsw[major(dumpdev)].d_psize)(dumpdev);
printf("dump ");
if (psize == -1) {