ysphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget+/translations/zh_CN/userspace-api/spec_ctrlmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/zh_TW/userspace-api/spec_ctrlmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/it_IT/userspace-api/spec_ctrlmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ja_JP/userspace-api/spec_ctrlmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ko_KR/userspace-api/spec_ctrlmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/pt_BR/userspace-api/spec_ctrlmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/sp_SP/userspace-api/spec_ctrlmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hSpeculation Controlh]hSpeculation Control}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhE/var/lib/git/docbuild/linux/Documentation/userspace-api/spec_ctrl.rsthKubh paragraph)}(hQuite some CPUs have speculation-related misfeatures which are in fact vulnerabilities causing data leaks in various forms even across privilege domains.h]hQuite some CPUs have speculation-related misfeatures which are in fact vulnerabilities causing data leaks in various forms even across privilege domains.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe kernel provides mitigation for such vulnerabilities in various forms. Some of these mitigations are compile-time configurable and some can be supplied on the kernel command line.h]hThe kernel provides mitigation for such vulnerabilities in various forms. Some of these mitigations are compile-time configurable and some can be supplied on the kernel command line.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hThere is also a class of mitigations which are very expensive, but they can be restricted to a certain set of processes or tasks in controlled environments. The mechanism to control these mitigations is via :manpage:`prctl(2)`.h](hThere is also a class of mitigations which are very expensive, but they can be restricted to a certain set of processes or tasks in controlled environments. The mechanism to control these mitigations is via }(hhhhhNhNubhmanpage)}(h:manpage:`prctl(2)`h]hprctl(2)}(hhhhhNhNubah}(h]h ]hah"]h$]h&] xml:spacepreservepathprctl(2)pageprctlsection2uh1hhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(h6There are two prctl options which are related to this:h]h6There are two prctl options which are related to this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh block_quote)}(h5* PR_GET_SPECULATION_CTRL * PR_SET_SPECULATION_CTRL h]h bullet_list)}(hhh](h list_item)}(hPR_GET_SPECULATION_CTRL h]h)}(hPR_GET_SPECULATION_CTRLh]hPR_GET_SPECULATION_CTRL}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj.ubah}(h]h ]h"]h$]h&]uh1j,hj)ubj-)}(hPR_SET_SPECULATION_CTRL h]h)}(hPR_SET_SPECULATION_CTRLh]hPR_SET_SPECULATION_CTRL}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjFubah}(h]h ]h"]h$]h&]uh1j,hj)ubeh}(h]h ]h"]h$]h&]bullet*uh1j'hhhKhj#ubah}(h]h ]h"]h$]h&]uh1j!hhhKhhhhubh)}(hhh](h)}(hPR_GET_SPECULATION_CTRLh]hPR_GET_SPECULATION_CTRL}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhKubh)}(hX"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 (with the caveat that PR_SPEC_L1D_FLUSH has less obvious semantics, see documentation for that specific control below):h]hX"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 (with the caveat that PR_SPEC_L1D_FLUSH has less obvious semantics, see documentation for that specific control below):}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjlhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hBith]hBit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hDefineh]hDefine}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(h0h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h PR_SPEC_PRCTLh]h PR_SPEC_PRCTL}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hj1ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hAMitigation can be controlled per task by PR_SET_SPECULATION_CTRL.h]hAMitigation can be controlled per task by PR_SET_SPECULATION_CTRL.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjHubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h1h]h1}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjhubah}(h]h ]h"]h$]h&]uh1jhjeubj)}(hhh]h)}(hPR_SPEC_ENABLEh]hPR_SPEC_ENABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjeubj)}(hhh]h)}(h;The speculation feature is enabled, mitigation is disabled.h]h;The speculation feature is enabled, mitigation is disabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hjh]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hPR_SPEC_DISABLEh]hPR_SPEC_DISABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h;The speculation feature is disabled, mitigation is enabled.h]h;The speculation feature is disabled, mitigation is enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h3h]h3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hPR_SPEC_FORCE_DISABLEh]hPR_SPEC_FORCE_DISABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(haSame as PR_SPEC_DISABLE, but cannot be undone. A subsequent prctl(..., PR_SPEC_ENABLE) will fail.h]haSame as PR_SPEC_DISABLE, but cannot be undone. A subsequent prctl(..., PR_SPEC_ENABLE) will fail.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hj1ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h4h]h4}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjQubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hhh]h)}(hPR_SPEC_DISABLE_NOEXECh]hPR_SPEC_DISABLE_NOEXEC}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjhubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hhh]h)}(hOSame as PR_SPEC_DISABLE, but the state will be cleared on :manpage:`execve(2)`.h](h:Same as PR_SPEC_DISABLE, but the state will be cleared on }(hjhhhNhNubh)}(h:manpage:`execve(2)`h]h execve(2)}(hjhhhNhNubah}(h]h ]hah"]h$]h&]jjj execve(2)jexecvejjuh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjlhhhhhNubh)}(hHIf all bits are 0 the CPU is not affected by the speculation misfeature.h]hHIf all bits are 0 the CPU is not affected by the speculation misfeature.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjlhhubh)}(hIf PR_SPEC_PRCTL is set, then the per-task control of the mitigation is available. If not set, prctl(PR_SET_SPECULATION_CTRL) for the speculation misfeature will fail.h]hIf PR_SPEC_PRCTL is set, then the per-task control of the mitigation is available. If not set, prctl(PR_SET_SPECULATION_CTRL) for the speculation misfeature will fail.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjlhhubhtarget)}(h.. _set_spec_ctrl:h]h}(h]h ]h"]h$]h&]refid set-spec-ctrluh1jhK5hjlhhhhubeh}(h]pr-get-speculation-ctrlah ]h"]pr_get_speculation_ctrlah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hPR_SET_SPECULATION_CTRLh]hPR_SET_SPECULATION_CTRL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK8ubh)}(hPR_SET_SPECULATION_CTRL allows to control the speculation misfeature, which is selected by arg2 of :manpage:`prctl(2)` per task. arg3 is used to hand in the control value, i.e. either PR_SPEC_ENABLE or PR_SPEC_DISABLE or PR_SPEC_FORCE_DISABLE.h](hcPR_SET_SPECULATION_CTRL allows to control the speculation misfeature, which is selected by arg2 of }(hjhhhNhNubh)}(h:manpage:`prctl(2)`h]hprctl(2)}(hjhhhNhNubah}(h]h ]hah"]h$]h&]jjjprctl(2)jprctljjuh1hhjubh} per task. arg3 is used to hand in the control value, i.e. either PR_SPEC_ENABLE or PR_SPEC_DISABLE or PR_SPEC_FORCE_DISABLE.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubeh}(h](pr-set-speculation-ctrljeh ]h"](pr_set_speculation_ctrl set_spec_ctrleh$]h&]uh1hhhhhhhhK8expect_referenced_by_name}j.jsexpect_referenced_by_id}jjsubh)}(hhh](h)}(hCommon error codesh]hCommon error codes}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhK@ubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjIubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKAuh1jhjIubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hValueh]hValue}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjfubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h)}(hMeaningh]hMeaning}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhj}ubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hXThe prctl is not implemented by the architecture or unused prctl(2) arguments are not 0.h]hXThe prctl is not implemented by the architecture or unused prctl(2) arguments are not 0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hENODEVh]hENODEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h9arg2 is selecting a not supported speculation misfeature.h]h9arg2 is selecting a not supported speculation misfeature.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]colsKuh1jhjFubah}(h]h ]h"]h$]h&]uh1jhj5hhhhhNubeh}(h]common-error-codesah ]h"]common error codesah$]h&]uh1hhhhhhhhK@ubh)}(hhh](h)}(h#PR_SET_SPECULATION_CTRL error codesh]h#PR_SET_SPECULATION_CTRL error codes}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhKKubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj@ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKHuh1jhj@ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hValueh]hValue}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj]ubah}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh]h)}(hMeaningh]hMeaning}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjtubah}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1jhj@ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hjh]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hSuccessh]hSuccess}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hERANGEh]hERANGE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hbarg3 is incorrect, i.e. it's neither PR_SPEC_ENABLE nor PR_SPEC_DISABLE nor PR_SPEC_FORCE_DISABLE.h]hdarg3 is incorrect, i.e. it’s neither PR_SPEC_ENABLE nor PR_SPEC_DISABLE nor PR_SPEC_FORCE_DISABLE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hENXIOh]hENXIO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hFor PR_SPEC_STORE_BYPASS: control of the selected speculation misfeature is not possible via prctl, because of the system's boot configuration.h]hFor PR_SPEC_STORE_BYPASS: control of the selected speculation misfeature is not possible via prctl, because of the system’s boot configuration.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hEPERMh]hEPERM}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjAubah}(h]h ]h"]h$]h&]uh1jhj>ubj)}(hhh]h)}(hXSpeculation was disabled with PR_SPEC_FORCE_DISABLE and caller tried to enable it again.h]hXSpeculation was disabled with PR_SPEC_FORCE_DISABLE and caller tried to enable it again.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjXubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hEPERMh]hEPERM}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjxubah}(h]h ]h"]h$]h&]uh1jhjuubj)}(hhh]h)}(hFor PR_SPEC_L1D_FLUSH and PR_SPEC_INDIRECT_BRANCH: control of the mitigation is not possible because of the system's boot configuration.h]hFor PR_SPEC_L1D_FLUSH and PR_SPEC_INDIRECT_BRANCH: control of the mitigation is not possible because of the system’s boot configuration.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjubah}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]colsKuh1jhj=ubah}(h]h ]h"]h$]h&]uh1jhj,hhhhhNubeh}(h]#pr-set-speculation-ctrl-error-codesah ]h"]#pr_set_speculation_ctrl error codesah$]h&]uh1hhhhhhhhKKubh)}(hhh](h)}(hSpeculation misfeature controlsh]hSpeculation misfeature controls}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK`ubj()}(hhh](j-)}(hXPR_SPEC_STORE_BYPASS: Speculative Store Bypass Invocations: * prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, 0, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_FORCE_DISABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE_NOEXEC, 0, 0); h](h)}(h.PR_SPEC_STORE_BYPASS: Speculative Store Bypassh]h.PR_SPEC_STORE_BYPASS: Speculative Store Bypass}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahjubhdefinition_list)}(hhh]hdefinition_list_item)}(hXInvocations: * prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, 0, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_FORCE_DISABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE_NOEXEC, 0, 0); h](hterm)}(h Invocations:h]h Invocations:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhhjubh definition)}(hhh]j()}(hhh](j-)}(h>prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, 0, 0, 0);h]h)}(hjh]h>prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, 0, 0, 0);}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1j,hj ubj-)}(hKprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE, 0, 0);h]h)}(hj)h]hKprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE, 0, 0);}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehj'ubah}(h]h ]h"]h$]h&]uh1j,hj ubj-)}(hLprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);h]h)}(hj@h]hLprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhj>ubah}(h]h ]h"]h$]h&]uh1j,hj ubj-)}(hRprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_FORCE_DISABLE, 0, 0);h]h)}(hjWh]hRprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_FORCE_DISABLE, 0, 0);}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjUubah}(h]h ]h"]h$]h&]uh1j,hj ubj-)}(hTprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE_NOEXEC, 0, 0); h]h)}(hSprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE_NOEXEC, 0, 0);h]hSprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE_NOEXEC, 0, 0);}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjlubah}(h]h ]h"]h$]h&]uh1j,hj ubeh}(h]h ]h"]h$]h&]jdjeuh1j'hhhKdhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j,hjhhhNhNubj-)}(hXPR_SPEC_INDIR_BRANCH: Indirect Branch Speculation in User Processes (Mitigate Spectre V2 style attacks against user processes) Invocations: * prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_ENABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0); h]j)}(hhh](j)}(hPR_SPEC_INDIR_BRANCH: Indirect Branch Speculation in User Processes (Mitigate Spectre V2 style attacks against user processes) h](j)}(hCPR_SPEC_INDIR_BRANCH: Indirect Branch Speculation in User Processesh]hCPR_SPEC_INDIR_BRANCH: Indirect Branch Speculation in User Processes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKkhjubj )}(hhh]h)}(h:(Mitigate Spectre V2 style attacks against user processes)h]h:(Mitigate Spectre V2 style attacks against user processes)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKkhjubj)}(hXLInvocations: * prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_ENABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE, 0, 0); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0); h](j)}(h Invocations:h]h Invocations:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKqhjubj )}(hhh]j()}(hhh](j-)}(hAprctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0);h]h)}(hjh]hAprctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0);}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjubah}(h]h ]h"]h$]h&]uh1j,hjubj-)}(hNprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_ENABLE, 0, 0);h]h)}(hj h]hNprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_ENABLE, 0, 0);}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1j,hjubj-)}(hOprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE, 0, 0);h]h)}(hj h]hOprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE, 0, 0);}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1j,hjubj-)}(hVprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0); h]h)}(hUprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0);h]hUprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0);}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhj5ubah}(h]h ]h"]h$]h&]uh1j,hjubeh}(h]h ]h"]h$]h&]jdjeuh1j'hhhKnhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKqhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j,hjhhhNhNubj-)}(hPR_SPEC_L1D_FLUSH: Flush L1D Cache on context switch out of the task (works only when tasks run on non SMT cores) h]j)}(hhh]j)}(hrPR_SPEC_L1D_FLUSH: Flush L1D Cache on context switch out of the task (works only when tasks run on non SMT cores) h](j)}(hDPR_SPEC_L1D_FLUSH: Flush L1D Cache on context switch out of the taskh]hDPR_SPEC_L1D_FLUSH: Flush L1D Cache on context switch out of the task}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKthjrubj )}(hhh]h)}(h,(works only when tasks run on non SMT cores)h]h,(works only when tasks run on non SMT cores)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jhhhKthjoubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j,hjhhhNhNubeh}(h]h ]h"]h$]h&]jd-uh1j'hhhKahjhhubh)}(hFor this control, PR_SPEC_ENABLE means that the **mitigation** is enabled (L1D is flushed), PR_SPEC_DISABLE means it is disabled.h](h0For this control, PR_SPEC_ENABLE means that the }(hjhhhNhNubhstrong)}(h**mitigation**h]h mitigation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhC is enabled (L1D is flushed), PR_SPEC_DISABLE means it is disabled.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKvhjhhubj")}(hInvocations: * 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); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, PR_SPEC_DISABLE, 0, 0);h]j)}(hhh]j)}(hInvocations: * 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); * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, PR_SPEC_DISABLE, 0, 0);h](j)}(h Invocations:h]h Invocations:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK{hjubj )}(hhh]j()}(hhh](j-)}(h;prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, 0, 0, 0);h]h)}(hjh]h;prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, 0, 0, 0);}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1j,hjubj-)}(hHprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, PR_SPEC_ENABLE, 0, 0);h]h)}(hj h]hHprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, PR_SPEC_ENABLE, 0, 0);}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hj ubah}(h]h ]h"]h$]h&]uh1j,hjubj-)}(hIprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, PR_SPEC_DISABLE, 0, 0);h]h)}(hj% h]hIprctl(PR_SET_SPECULATION_CTRL, PR_SPEC_L1D_FLUSH, PR_SPEC_DISABLE, 0, 0);}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj# ubah}(h]h ]h"]h$]h&]uh1j,hjubeh}(h]h ]h"]h$]h&]jdjeuh1j'hhhKzhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j!hhhKyhjhhubeh}(h]speculation-misfeature-controlsah ]h"]speculation misfeature controlsah$]h&]uh1hhhhhhhhK`ubeh}(h]speculation-controlah ]h"]speculation controlah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}j]jasnameids}(je jb jjj.jj-j*j)j&jjj] jZ u nametypes}(je jj.j-j)jj] uh}(jb hjjljjj*jj&j5jj,jZ ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h3Hyperlink target "set-spec-ctrl" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehʌlineK5uh1j uba transformerN include_log] decorationNhhub.