Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Documentation: clarify PR_SPEC_L1D_FLUSH

For PR_SPEC_STORE_BYPASS and PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE
means "disable the speculation bug" i.e. "enable the mitigation".

For PR_SPEC_L1D_FLUSH, PR_SPEC_DISABLE means "disable the mitigation".
This is not obvious, so document it.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251015-l1d-flush-doc-v1-1-f8cefea3f2f2@google.com>

authored by

Brendan Jackman and committed by
Jonathan Corbet
aab703b3 ba245710

+5 -1
+5 -1
Documentation/userspace-api/spec_ctrl.rst
··· 26 26 27 27 PR_GET_SPECULATION_CTRL returns the state of the speculation misfeature 28 28 which is selected with arg2 of prctl(2). The return value uses bits 0-3 with 29 - the following meaning: 29 + the following meaning (with the caveat that PR_SPEC_L1D_FLUSH has less obvious 30 + semantics, see documentation for that specific control below): 30 31 31 32 ==== ====================== ================================================== 32 33 Bit Define Description ··· 110 109 111 110 - PR_SPEC_L1D_FLUSH: Flush L1D Cache on context switch out of the task 112 111 (works only when tasks run on non SMT cores) 112 + 113 + For this control, PR_SPEC_ENABLE means that the **mitigation** is enabled (L1D 114 + is flushed), PR_SPEC_DISABLE means it is disabled. 113 115 114 116 Invocations: 115 117 * prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, 0, 0, 0);