summaryrefslogtreecommitdiff
path: root/sys/arch
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/arch
parentc9145e6ecb84db6c26896fbf4b51a9a25172e9b2 (diff)
for key material that is being being discarded, convert bzero() to
explicit_bzero() where required ok markus mikeb
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/aesni.c10
-rw-r--r--sys/arch/amd64/amd64/via.c8
-rw-r--r--sys/arch/i386/i386/via.c8
-rw-r--r--sys/arch/i386/pci/glxsb.c8
4 files changed, 17 insertions, 17 deletions
diff --git a/sys/arch/amd64/amd64/aesni.c b/sys/arch/amd64/amd64/aesni.c
index a8adc77bcfc..afb6e593fd3 100644
--- a/sys/arch/amd64/amd64/aesni.c
+++ b/sys/arch/amd64/amd64/aesni.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aesni.c,v 1.17 2010/12/15 23:34:23 mikeb Exp $ */
+/* $OpenBSD: aesni.c,v 1.18 2011/01/11 15:42:05 deraadt Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
* Copyright (c) 2003, 2004 Theo de Raadt
@@ -265,11 +265,11 @@ aesni_freesession(u_int64_t tid)
axf = swd->sw_axf;
if (swd->sw_ictx) {
- bzero(swd->sw_ictx, axf->ctxsize);
+ explicit_bzero(swd->sw_ictx, axf->ctxsize);
free(swd->sw_ictx, M_CRYPTO_DATA);
}
if (swd->sw_octx) {
- bzero(swd->sw_octx, axf->ctxsize);
+ explicit_bzero(swd->sw_octx, axf->ctxsize);
free(swd->sw_octx, M_CRYPTO_DATA);
}
free(swd, M_CRYPTO_DATA);
@@ -311,7 +311,7 @@ aesni_encdec(struct cryptop *crp, struct cryptodesc *crd,
if (crd->crd_len > aesni_sc->sc_buflen) {
if (buf != NULL) {
- bzero(buf, aesni_sc->sc_buflen);
+ explicit_bzero(buf, aesni_sc->sc_buflen);
free(buf, M_DEVBUF);
}
@@ -399,7 +399,7 @@ aesni_encdec(struct cryptop *crp, struct cryptodesc *crd,
crd->crd_len, buf);
out:
- bzero(buf, roundup(crd->crd_len, EALG_MAX_BLOCK_LEN));
+ explicit_bzero(buf, roundup(crd->crd_len, EALG_MAX_BLOCK_LEN));
return (err);
}
diff --git a/sys/arch/amd64/amd64/via.c b/sys/arch/amd64/amd64/via.c
index 3f1a3985db6..45a245b18b8 100644
--- a/sys/arch/amd64/amd64/via.c
+++ b/sys/arch/amd64/amd64/via.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via.c,v 1.8 2010/12/15 23:34:23 mikeb Exp $ */
+/* $OpenBSD: via.c,v 1.9 2011/01/11 15:42:05 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -302,11 +302,11 @@ viac3_crypto_freesession(u_int64_t tid)
axf = swd->sw_axf;
if (swd->sw_ictx) {
- bzero(swd->sw_ictx, axf->ctxsize);
+ explicit_bzero(swd->sw_ictx, axf->ctxsize);
free(swd->sw_ictx, M_CRYPTO_DATA);
}
if (swd->sw_octx) {
- bzero(swd->sw_octx, axf->ctxsize);
+ explicit_bzero(swd->sw_octx, axf->ctxsize);
free(swd->sw_octx, M_CRYPTO_DATA);
}
free(swd, M_CRYPTO_DATA);
@@ -427,7 +427,7 @@ viac3_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
crd->crd_len);
if (sc->op_buf != NULL) {
- bzero(sc->op_buf, crd->crd_len);
+ explicit_bzero(sc->op_buf, crd->crd_len);
free(sc->op_buf, M_DEVBUF);
sc->op_buf = NULL;
}
diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c
index 19650e3b92f..351091a7580 100644
--- a/sys/arch/i386/i386/via.c
+++ b/sys/arch/i386/i386/via.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via.c,v 1.25 2010/12/15 23:34:23 mikeb Exp $ */
+/* $OpenBSD: via.c,v 1.26 2011/01/11 15:42:04 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -303,11 +303,11 @@ viac3_crypto_freesession(u_int64_t tid)
axf = swd->sw_axf;
if (swd->sw_ictx) {
- bzero(swd->sw_ictx, axf->ctxsize);
+ explicit_bzero(swd->sw_ictx, axf->ctxsize);
free(swd->sw_ictx, M_CRYPTO_DATA);
}
if (swd->sw_octx) {
- bzero(swd->sw_octx, axf->ctxsize);
+ explicit_bzero(swd->sw_octx, axf->ctxsize);
free(swd->sw_octx, M_CRYPTO_DATA);
}
free(swd, M_CRYPTO_DATA);
@@ -428,7 +428,7 @@ viac3_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
crd->crd_len);
if (sc->op_buf != NULL) {
- bzero(sc->op_buf, crd->crd_len);
+ explicit_bzero(sc->op_buf, crd->crd_len);
free(sc->op_buf, M_DEVBUF);
sc->op_buf = NULL;
}
diff --git a/sys/arch/i386/pci/glxsb.c b/sys/arch/i386/pci/glxsb.c
index 51c5cec9970..a3e4d6685f4 100644
--- a/sys/arch/i386/pci/glxsb.c
+++ b/sys/arch/i386/pci/glxsb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glxsb.c,v 1.21 2010/12/15 23:34:23 mikeb Exp $ */
+/* $OpenBSD: glxsb.c,v 1.22 2011/01/11 15:42:05 deraadt Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
@@ -522,11 +522,11 @@ glxsb_crypto_freesession(uint64_t tid)
axf = swd->sw_axf;
if (swd->sw_ictx) {
- bzero(swd->sw_ictx, axf->ctxsize);
+ explicit_bzero(swd->sw_ictx, axf->ctxsize);
free(swd->sw_ictx, M_CRYPTO_DATA);
}
if (swd->sw_octx) {
- bzero(swd->sw_octx, axf->ctxsize);
+ explicit_bzero(swd->sw_octx, axf->ctxsize);
free(swd->sw_octx, M_CRYPTO_DATA);
}
free(swd, M_CRYPTO_DATA);
@@ -749,7 +749,7 @@ glxsb_crypto_encdec(struct cryptop *crp, struct cryptodesc *crd,
}
/* All AES processing has now been done. */
- bzero(sc->sc_dma.dma_vaddr, xlen * 2);
+ explicit_bzero(sc->sc_dma.dma_vaddr, xlen * 2);
out:
return (err);