]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
PR_GET_SPECULATION_CTRL.2const: Tweak after split
authorAlejandro Colomar <alx@kernel.org>
Thu, 30 May 2024 12:12:36 +0000 (14:12 +0200)
committerAlejandro Colomar <alx@kernel.org>
Thu, 30 May 2024 23:54:55 +0000 (01:54 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2const/PR_GET_SPECULATION_CTRL.2const

index cc547f17a9dafe1664f52fd715b51ecb0346bf07..b86d7f7539d556cb8fdd93ab3f70c554cbcc34cf 100644 (file)
@@ -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)