summaryrefslogtreecommitdiff
path: root/Documentation/userspace-api/spec_ctrl.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/userspace-api/spec_ctrl.rst')
-rw-r--r--Documentation/userspace-api/spec_ctrl.rst18
1 files changed, 13 insertions, 5 deletions
diff --git a/Documentation/userspace-api/spec_ctrl.rst b/Documentation/userspace-api/spec_ctrl.rst
index 5e8ed9eef9aa..61fe020b23a2 100644
--- a/Documentation/userspace-api/spec_ctrl.rst
+++ b/Documentation/userspace-api/spec_ctrl.rst
@@ -26,7 +26,8 @@ PR_GET_SPECULATION_CTRL
PR_GET_SPECULATION_CTRL returns the state of the speculation misfeature
which is selected with arg2 of prctl(2). The return value uses bits 0-3 with
-the following meaning:
+the following meaning (with the caveat that PR_SPEC_L1D_FLUSH has less obvious
+semantics, see documentation for that specific control below):
==== ====================== ==================================================
Bit Define Description
@@ -80,11 +81,15 @@ Value Meaning
ERANGE arg3 is incorrect, i.e. it's neither PR_SPEC_ENABLE nor
PR_SPEC_DISABLE nor PR_SPEC_FORCE_DISABLE.
-ENXIO Control of the selected speculation misfeature is not possible.
- See PR_GET_SPECULATION_CTRL.
+ENXIO For PR_SPEC_STORE_BYPASS: control of the selected speculation misfeature
+ is not possible via prctl, because of the system's boot configuration.
+
+EPERM Speculation was disabled with PR_SPEC_FORCE_DISABLE and caller tried to
+ enable it again.
+
+EPERM For PR_SPEC_L1D_FLUSH and PR_SPEC_INDIRECT_BRANCH: control of the
+ mitigation is not possible because of the system's boot configuration.
-EPERM Speculation was disabled with PR_SPEC_FORCE_DISABLE and caller
- tried to enable it again.
======= =================================================================
Speculation misfeature controls
@@ -110,6 +115,9 @@ Speculation misfeature controls
- PR_SPEC_L1D_FLUSH: Flush L1D Cache on context switch out of the task
(works only when tasks run on non SMT cores)
+For this control, PR_SPEC_ENABLE means that the **mitigation** is enabled (L1D
+is flushed), PR_SPEC_DISABLE means it is disabled.
+
Invocations:
* prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, 0, 0, 0);
* prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, PR_SPEC_ENABLE, 0, 0);