22Speculation Control
33===================
44
5- Quite some CPUs have speculation related misfeatures which are in fact
6- vulnerabilites causing data leaks in various forms even accross privilege
7- domains.
5+ Quite some CPUs have speculation- related misfeatures which are in
6+ fact vulnerabilities causing data leaks in various forms even across
7+ privilege domains.
88
99The kernel provides mitigation for such vulnerabilities in various
10- forms. Some of these mitigations are compile time configurable and some on
11- the kernel command line.
10+ forms. Some of these mitigations are compile- time configurable and some
11+ can be supplied on the kernel command line.
1212
1313There is also a class of mitigations which are very expensive, but they can
1414be restricted to a certain set of processes or tasks in controlled
@@ -32,18 +32,18 @@ the following meaning:
3232Bit Define Description
3333==== ===================== ===================================================
34340 PR_SPEC_PRCTL Mitigation can be controlled per task by
35- PR_SET_SPECULATION_CTRL
35+ PR_SET_SPECULATION_CTRL.
36361 PR_SPEC_ENABLE The speculation feature is enabled, mitigation is
37- disabled
37+ disabled.
38382 PR_SPEC_DISABLE The speculation feature is disabled, mitigation is
39- enabled
39+ enabled.
40403 PR_SPEC_FORCE_DISABLE Same as PR_SPEC_DISABLE, but cannot be undone. A
4141 subsequent prctl(..., PR_SPEC_ENABLE) will fail.
4242==== ===================== ===================================================
4343
4444If all bits are 0 the CPU is not affected by the speculation misfeature.
4545
46- If PR_SPEC_PRCTL is set, then the per task control of the mitigation is
46+ If PR_SPEC_PRCTL is set, then the per- task control of the mitigation is
4747available. If not set, prctl(PR_SET_SPECULATION_CTRL) for the speculation
4848misfeature will fail.
4949
@@ -61,9 +61,9 @@ Common error codes
6161Value Meaning
6262======= =================================================================
6363EINVAL The prctl is not implemented by the architecture or unused
64- prctl(2) arguments are not 0
64+ prctl(2) arguments are not 0.
6565
66- ENODEV arg2 is selecting a not supported speculation misfeature
66+ ENODEV arg2 is selecting a not supported speculation misfeature.
6767======= =================================================================
6868
6969PR_SET_SPECULATION_CTRL error codes
@@ -74,7 +74,7 @@ Value Meaning
74740 Success
7575
7676ERANGE arg3 is incorrect, i.e. it's neither PR_SPEC_ENABLE nor
77- PR_SPEC_DISABLE nor PR_SPEC_FORCE_DISABLE
77+ PR_SPEC_DISABLE nor PR_SPEC_FORCE_DISABLE.
7878
7979ENXIO Control of the selected speculation misfeature is not possible.
8080 See PR_GET_SPECULATION_CTRL.
0 commit comments