summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/libkern.h
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2011-01-10 23:23:56 +0000
committertedu <tedu@openbsd.org>2011-01-10 23:23:56 +0000
commitf5d2eefeb6c492f8ab3e752fb0b086496271977f (patch)
tree989efedd9da100c040b61831f0aff4f054bbe05b /sys/lib/libkern/libkern.h
parenttweak previous; ok millert (diff)
downloadwireguard-openbsd-f5d2eefeb6c492f8ab3e752fb0b086496271977f.tar.xz
wireguard-openbsd-f5d2eefeb6c492f8ab3e752fb0b086496271977f.zip
add a new function, explicit_bzero, to be used for erasing "secret" stuff.
unlike normal bzero, we guarantee that the compiler will not optimize out calls to this function for otherwise dead variables. to be adjusted as needed when compilers and linkers get smarter. ok deraadt miod
Diffstat (limited to 'sys/lib/libkern/libkern.h')
-rw-r--r--sys/lib/libkern/libkern.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/lib/libkern/libkern.h b/sys/lib/libkern/libkern.h
index 6fd66719779..c9545cd33ea 100644
--- a/sys/lib/libkern/libkern.h
+++ b/sys/lib/libkern/libkern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libkern.h,v 1.27 2010/07/20 15:28:44 matthew Exp $ */
+/* $OpenBSD: libkern.h,v 1.28 2011/01/10 23:23:56 tedu Exp $ */
/* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */
/*-
@@ -143,6 +143,7 @@ void __assert(const char *, const char *, int, const char *)
__attribute__ ((__noreturn__));
int bcmp(const void *, const void *, size_t);
void bzero(void *, size_t);
+void explicit_bzero(void *, size_t);
int ffs(int);
void *memchr(const void *, int, size_t);
int memcmp(const void *, const void *, size_t);