summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_swap_encrypt.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-11 15:42:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-11 15:42:07 +0000
commitb8adaa72672fc21a17c44baf5ab66efb66e8c6f1 (patch)
tree553d59faec2af2eebc1396c6fa7c4f2c9f277c35 /sys/uvm/uvm_swap_encrypt.c
parentc9145e6ecb84db6c26896fbf4b51a9a25172e9b2 (diff)
for key material that is being being discarded, convert bzero() to
explicit_bzero() where required ok markus mikeb
Diffstat (limited to 'sys/uvm/uvm_swap_encrypt.c')
-rw-r--r--sys/uvm/uvm_swap_encrypt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_swap_encrypt.c b/sys/uvm/uvm_swap_encrypt.c
index 85f5332385f..4400a1aeaca 100644
--- a/sys/uvm/uvm_swap_encrypt.c
+++ b/sys/uvm/uvm_swap_encrypt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap_encrypt.c,v 1.16 2010/04/20 22:05:44 tedu Exp $ */
+/* $OpenBSD: uvm_swap_encrypt.c,v 1.17 2011/01/11 15:42:06 deraadt Exp $ */
/*
* Copyright 1999 Niels Provos <provos@citi.umich.edu>
@@ -95,7 +95,7 @@ swap_key_delete(struct swap_key *key)
/* Make sure that this key gets removed if we just used it */
swap_key_cleanup(key);
- memset(key, 0, sizeof(*key));
+ explicit_bzero(key, sizeof(*key));
uvm_swpkeysdeleted++;
}
@@ -223,7 +223,7 @@ swap_key_cleanup(struct swap_key *key)
return;
/* Zero out the subkeys */
- memset(&swap_ctxt, 0, sizeof(swap_ctxt));
+ explicit_bzero(&swap_ctxt, sizeof(swap_ctxt));
kcur = NULL;
}