summaryrefslogtreecommitdiffstats
path: root/man3/bzero.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man3/bzero.317
1 files changed, 8 insertions, 9 deletions
diff --git a/man3/bzero.3 b/man3/bzero.3
index 35abb18..59b30ab 100644
--- a/man3/bzero.3
+++ b/man3/bzero.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH bzero 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH bzero 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
bzero, explicit_bzero \- zero a byte string
.SH LIBRARY
@@ -12,11 +12,11 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <strings.h>
-.PP
+.P
.BI "void bzero(void " s [. n "], size_t " n );
-.PP
+.P
.B #include <string.h>
-.PP
+.P
.BI "void explicit_bzero(void " s [. n "], size_t " n );
.fi
.SH DESCRIPTION
@@ -27,7 +27,7 @@ function erases the data in the
bytes of the memory starting at the location pointed to by
.IR s ,
by writing zeros (bytes containing \[aq]\e0\[aq]) to that area.
-.PP
+.P
The
.BR explicit_bzero ()
function performs the same task as
@@ -53,7 +53,6 @@ T{
.BR explicit_bzero ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH STANDARDS
None.
.SH HISTORY
@@ -94,7 +93,7 @@ by an incorrect or compromised program.
Calls to
.BR explicit_bzero ()
are never optimized away by the compiler.
-.PP
+.P
The
.BR explicit_bzero ()
function does not solve all problems associated with erasing sensitive data:
@@ -133,7 +132,7 @@ by a bug than data in a register, and thus the
call creates a brief time window where the sensitive data is more
vulnerable than it would otherwise have been
if no attempt had been made to erase the data.
-.PP
+.P
Note that declaring the sensitive variable with the
.B volatile
qualifier does
@@ -143,7 +142,7 @@ Indeed, it will make them worse, since, for example,
it may force a variable that would otherwise have been optimized
into a register to instead be maintained in (more vulnerable)
RAM for its entire lifetime.
-.PP
+.P
Notwithstanding the above details, for security-conscious applications, using
.BR explicit_bzero ()
is generally preferable to not using it.