aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-05-30 14:12:36 +0200
committerAlejandro Colomar <alx@kernel.org>2024-05-31 01:54:55 +0200
commitb4ae2650c83d9e941621b6de468ea8a4e00dec45 (patch)
tree98653996092f58b3b885d24c59eb1c5585030da2
parent4d63f144b9b0d62d4eae0677b20505d4468298c2 (diff)
downloadman-pages-b4ae2650c83d9e941621b6de468ea8a4e00dec45.tar.gz
PR_GET_SPECULATION_CTRL.2const: Tweak after split
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man/man2const/PR_GET_SPECULATION_CTRL.2const51
1 files changed, 26 insertions, 25 deletions
diff --git a/man/man2const/PR_GET_SPECULATION_CTRL.2const b/man/man2const/PR_GET_SPECULATION_CTRL.2const
index cc547f17a9..b86d7f7539 100644
--- a/man/man2const/PR_GET_SPECULATION_CTRL.2const
+++ b/man/man2const/PR_GET_SPECULATION_CTRL.2const
@@ -1,5 +1,6 @@
.\" Copyright 2018, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
.\" Copyright 2018, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Copyright 2024, Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
@@ -15,21 +16,25 @@ Standard C library
.nf
.B #include <sys/prctl.h>
.P
-.BI "int prctl(int " op ", ...);"
+.BI "int prctl(PR_GET_SPECULATION_CTRL, long " misfeature ", 0L, 0L, 0L);"
.fi
.SH DESCRIPTION
-.TP
-.BR PR_GET_SPECULATION_CTRL " (since Linux 4.17)"
-Return (as the function result)
+Return
the state of the speculation misfeature specified in
-.IR arg2 .
-Currently, the only permitted value for this argument is
+.IR misfeature .
+.P
+Currently,
+.I misfeature
+must be one of:
+.TP
.B PR_SPEC_STORE_BYPASS
-(otherwise the call fails with the error
-.BR ENODEV ).
-.IP
-The return value uses bits 0-3 with the following meaning:
-.RS
+Get the state of the speculative store bypass misfeature.
+.\" commit 9137bb27e60e554dab694eafa4cca241fa3a694f
+.TP
+.BR PR_SPEC_INDIRECT_BRANCH " (since Linux 4.20)"
+Get the state of the indirect branch speculation misfeature.
+.P
+The return value uses bits 0-4 with the following meaning:
.TP
.B PR_SPEC_PRCTL
Mitigation can be controlled per thread by
@@ -51,36 +56,32 @@ Same as
.BR PR_SPEC_DISABLE ,
but the state will be cleared on
.BR execve (2).
-.RE
-.IP
+.P
If all bits are 0,
then the CPU is not affected by the speculation misfeature.
-.IP
+.P
If
.B PR_SPEC_PRCTL
is set, then per-thread control of the mitigation is available.
If not set,
-.BR prctl ()
+.BR PR_SET_SPECULATION_CTRL (2const)
for the speculation misfeature will fail.
-.IP
-The
-.IR arg3 ,
-.IR arg4 ,
-and
-.I arg5
-arguments must be specified as 0; otherwise the call fails with the error
-.BR EINVAL .
.SH RETURN VALUE
On success,
-.BR PR_GET_SPECULATION_CTRL ,
-return the nonnegative values described above.
+.B PR_GET_SPECULATION_CTRL
+returns the nonnegative value described above.
On error, \-1 is returned, and
.I errno
is set to indicate the error.
.SH ERRORS
+.TP
+.B ENODEV
+The kernel or CPU does not support the requested speculation
+.IR misfeature .
.SH STANDARDS
Linux.
.SH HISTORY
+Linux 4.17.
.SH SEE ALSO
.BR prctl (2),
.BR PR_SET_SPECULATION_CTRL (2const)