.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:55:27 1993 by Rik Faith (faith@cs.unc.edu)
-.TH MEMCMP 3 2014-12-31 "" "Linux Programmer's Manual"
+.TH MEMCMP 3 2015-08-08 "" "Linux Programmer's Manual"
.SH NAME
memcmp \- compare memory areas
.SH SYNOPSIS
.I n
is zero, the return value is zero.
.SH ATTRIBUTES
-.SS Multithreading (see pthreads(7))
-The
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
.BR memcmp ()
-function is thread-safe.
+T} Thread safety MT-Safe
+.TE
.SH CONFORMING TO
-SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
+POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
.SH NOTES
.PP
Do not use
.BR memcmp ()
to compare security critical data, such as cryptographic secrets,
-because the required CPU time depends on the amount of equal bytes.
+because the required CPU time depends on the number of equal bytes.
+Instead, a function that performs comparisons in constant time is required.
+Some operating systems provide such a function (e.g., NetBSD's
+.BR consttime_memequal ()),
+but no such function is specified in POSIX.
+On Linux, it may be necessary to implement such a function oneself.
.SH SEE ALSO
.BR bcmp (3),
.BR strcasecmp (3),