sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/arch/powerpc/dexcrmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/arch/powerpc/dexcrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/arch/powerpc/dexcrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/arch/powerpc/dexcrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/arch/powerpc/dexcrmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/arch/powerpc/dexcrmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h)SPDX-License-Identifier: GPL-2.0-or-laterh]h)SPDX-License-Identifier: GPL-2.0-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/arch/powerpc/dexcr.rsthKubhsection)}(hhh](htitle)}(h*DEXCR (Dynamic Execution Control Register)h]h*DEXCR (Dynamic Execution Control Register)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hOverviewh]hOverview}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hX?The DEXCR is a privileged special purpose register (SPR) introduced in PowerPC ISA 3.1B (Power10) that allows per-cpu control over several dynamic execution behaviours. These behaviours include speculation (e.g., indirect branch target prediction) and enabling return-oriented programming (ROP) protection instructions.h]hX?The DEXCR is a privileged special purpose register (SPR) introduced in PowerPC ISA 3.1B (Power10) that allows per-cpu control over several dynamic execution behaviours. These behaviours include speculation (e.g., indirect branch target prediction) and enabling return-oriented programming (ROP) protection instructions.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hThe execution control is exposed in hardware as up to 32 bits ('aspects') in the DEXCR. Each aspect controls a certain behaviour, and can be set or cleared to enable/disable the aspect. There are several variants of the DEXCR for different purposes:h]hThe execution control is exposed in hardware as up to 32 bits (‘aspects’) in the DEXCR. Each aspect controls a certain behaviour, and can be set or cleared to enable/disable the aspect. There are several variants of the DEXCR for different purposes:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hNDEXCR A privileged SPR that can control aspects for userspace and kernel spaceh](hterm)}(hDEXCRh]hDEXCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhhubh definition)}(hhh]h)}(hHA privileged SPR that can control aspects for userspace and kernel spaceh]hHA privileged SPR that can control aspects for userspace and kernel space}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubh)}(hHDEXCR A hypervisor-privileged SPR that can control aspects for the hypervisor and enforce aspects for the kernel and userspace.h](j)}(hHDEXCRh]hHDEXCR}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj2ubj)}(hhh]h)}(hyA hypervisor-privileged SPR that can control aspects for the hypervisor and enforce aspects for the kernel and userspace.h]hyA hypervisor-privileged SPR that can control aspects for the hypervisor and enforce aspects for the kernel and userspace.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjDubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hZUDEXCR An optional ultravisor-privileged SPR that can control aspects for the ultravisor. h](j)}(hUDEXCRh]hUDEXCR}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjaubj)}(hhh]h)}(hRAn optional ultravisor-privileged SPR that can control aspects for the ultravisor.h]hRAn optional ultravisor-privileged SPR that can control aspects for the ultravisor.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjsubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hXAUserspace can examine the current DEXCR state using a dedicated SPR that provides a non-privileged read-only view of the userspace DEXCR aspects. There is also an SPR that provides a read-only view of the hypervisor enforced aspects, which ORed with the userspace DEXCR view gives the effective DEXCR state for a process.h]hXAUserspace can examine the current DEXCR state using a dedicated SPR that provides a non-privileged read-only view of the userspace DEXCR aspects. There is also an SPR that provides a read-only view of the hypervisor enforced aspects, which ORed with the userspace DEXCR view gives the effective DEXCR state for a process.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Configurationh]h Configuration}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK%ubh)}(hhh](h)}(hprctlh]hprctl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK(ubh)}(hA process can control its own userspace DEXCR value using the ``PR_PPC_GET_DEXCR`` and ``PR_PPC_SET_DEXCR`` pair of :manpage:`prctl(2)` commands. These calls have the form::h](h>A process can control its own userspace DEXCR value using the }(hjhhhNhNubhliteral)}(h``PR_PPC_GET_DEXCR``h]hPR_PPC_GET_DEXCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``PR_PPC_SET_DEXCR``h]hPR_PPC_SET_DEXCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh pair of }(hjhhhNhNubhmanpage)}(h:manpage:`prctl(2)`h]hprctl(2)}(hjhhhNhNubah}(h]h ]jah"]h$]h&]hhpathprctl(2)pageprctlsection2uh1jhjubh% commands. These calls have the form:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK*hjhhubh literal_block)}(h~prctl(PR_PPC_GET_DEXCR, unsigned long which, 0, 0, 0); prctl(PR_PPC_SET_DEXCR, unsigned long which, unsigned long ctrl, 0, 0);h]h~prctl(PR_PPC_GET_DEXCR, unsigned long which, 0, 0, 0); prctl(PR_PPC_SET_DEXCR, unsigned long which, unsigned long ctrl, 0, 0);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhK.hjhhubh)}(hThe possible 'which' and 'ctrl' values are as follows. Note there is no relation between the 'which' value and the DEXCR aspect's index.h]hThe possible ‘which’ and ‘ctrl’ values are as follows. Note there is no relation between the ‘which’ value and the DEXCR aspect’s index.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jDhjAubjE)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jDhjAubjE)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jDhjAubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h``prctl()`` whichh](j)}(h ``prctl()``h]hprctl()}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubh which}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK8hjpubah}(h]h ]h"]h$]h&]uh1jnhjkubjo)}(hhh]h)}(h Aspect nameh]h Aspect name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubah}(h]h ]h"]h$]h&]uh1jnhjkubjo)}(hhh]h)}(h Aspect indexh]h Aspect index}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1jnhjkubeh}(h]h ]h"]h$]h&]uh1jihjfubah}(h]h ]h"]h$]h&]uh1jdhjAubhtbody)}(hhh](jj)}(hhh](jo)}(hhh]h)}(h``PR_PPC_DEXCR_SBHE``h]j)}(hjh]hPR_PPC_DEXCR_SBHE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjubeh}(h]h ]h"]h$]h&]uh1jihjubjj)}(hhh](jo)}(hhh]h)}(h``PR_PPC_DEXCR_IBRTPD``h]j)}(hj3h]hPR_PPC_DEXCR_IBRTPD}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1hhhhK@hj.ubah}(h]h ]h"]h$]h&]uh1jnhj+ubjo)}(hhh]h)}(hThis aspect can be configured with PR_PPC_SET_DEXCR (get only)h]h>This aspect can be configured with PR_PPC_SET_DEXCR (get only)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jnhjubeh}(h]h ]h"]h$]h&]uh1jihjubjj)}(hhh](jo)}(hhh]h)}(h``PR_PPC_DEXCR_CTRL_SET``h]j)}(hjh]hPR_PPC_DEXCR_CTRL_SET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jnhjubjo)}(hhh]h)}(h$This aspect is set / set this aspecth]h$This aspect is set / set this aspect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jnhjubeh}(h]h ]h"]h$]h&]uh1jihjubjj)}(hhh](jo)}(hhh]h)}(h``PR_PPC_DEXCR_CTRL_CLEAR``h]j)}(hj6h]hPR_PPC_DEXCR_CTRL_CLEAR}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hhhhKYhj1ubah}(h]h ]h"]h$]h&]uh1jnhj.ubjo)}(hhh]h)}(h(This aspect is clear / clear this aspecth]h(This aspect is clear / clear this aspect}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjQubah}(h]h ]h"]h$]h&]uh1jnhj.ubeh}(h]h ]h"]h$]h&]uh1jihjubjj)}(hhh](jo)}(hhh]h)}(h ``PR_PPC_DEXCR_CTRL_SET_ONEXEC``h]j)}(hjvh]hPR_PPC_DEXCR_CTRL_SET_ONEXEC}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1hhhhK\hjqubah}(h]h ]h"]h$]h&]uh1jnhjnubjo)}(hhh]h)}(h?This aspect will be set after exec / set this aspect after exech]h?This aspect will be set after exec / set this aspect after exec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjubah}(h]h ]h"]h$]h&]uh1jnhjnubeh}(h]h ]h"]h$]h&]uh1jihjubjj)}(hhh](jo)}(hhh]h)}(h"``PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC``h]j)}(hjh]hPR_PPC_DEXCR_CTRL_CLEAR_ONEXEC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubah}(h]h ]h"]h$]h&]uh1jnhjubjo)}(hhh]h)}(hCThis aspect will be clear after exec / clear this aspect after exech]hCThis aspect will be clear after exec / clear this aspect after exec}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjubah}(h]h ]h"]h$]h&]uh1jnhjubeh}(h]h ]h"]h$]h&]uh1jihjubeh}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]colsKuh1j?hjCubah}(h]h ]h"]h$]h&]uh1j:hjhhhNhNubh)}(h Note thath]h Note that}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjhhubh bullet_list)}(hhh](h list_item)}(hQwhich is a plain value, not a bitmask. Aspects must be worked with individually. h]h)}(hPwhich is a plain value, not a bitmask. Aspects must be worked with individually.h]hPwhich is a plain value, not a bitmask. Aspects must be worked with individually.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXuctrl is a bitmask. ``PR_PPC_GET_DEXCR`` returns both the current and onexec configuration. For example, ``PR_PPC_GET_DEXCR`` may return ``PR_PPC_DEXCR_CTRL_EDITABLE | PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC``. This would indicate the aspect is currently set, it will be cleared when you run exec, and you can change this with the ``PR_PPC_SET_DEXCR`` prctl. h]h)}(hXtctrl is a bitmask. ``PR_PPC_GET_DEXCR`` returns both the current and onexec configuration. For example, ``PR_PPC_GET_DEXCR`` may return ``PR_PPC_DEXCR_CTRL_EDITABLE | PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC``. This would indicate the aspect is currently set, it will be cleared when you run exec, and you can change this with the ``PR_PPC_SET_DEXCR`` prctl.h](hctrl is a bitmask. }(hj2hhhNhNubj)}(h``PR_PPC_GET_DEXCR``h]hPR_PPC_GET_DEXCR}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubhA returns both the current and onexec configuration. For example, }(hj2hhhNhNubj)}(h``PR_PPC_GET_DEXCR``h]hPR_PPC_GET_DEXCR}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh may return }(hj2hhhNhNubj)}(hW``PR_PPC_DEXCR_CTRL_EDITABLE | PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC``h]hSPR_PPC_DEXCR_CTRL_EDITABLE | PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubhz. This would indicate the aspect is currently set, it will be cleared when you run exec, and you can change this with the }(hj2hhhNhNubj)}(h``PR_PPC_SET_DEXCR``h]hPR_PPC_SET_DEXCR}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh prctl.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKfhj.ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hX The set/clear terminology refers to setting/clearing the bit in the DEXCR. For example:: prctl(PR_PPC_SET_DEXCR, PR_PPC_DEXCR_IBRTPD, PR_PPC_DEXCR_CTRL_SET, 0, 0); will set the IBRTPD aspect bit in the DEXCR, causing indirect branch prediction to be disabled. h](h)}(hXThe set/clear terminology refers to setting/clearing the bit in the DEXCR. For example::h]hWThe set/clear terminology refers to setting/clearing the bit in the DEXCR. For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubj)}(hJprctl(PR_PPC_SET_DEXCR, PR_PPC_DEXCR_IBRTPD, PR_PPC_DEXCR_CTRL_SET, 0, 0);h]hJprctl(PR_PPC_SET_DEXCR, PR_PPC_DEXCR_IBRTPD, PR_PPC_DEXCR_CTRL_SET, 0, 0);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKphjubh)}(h_will set the IBRTPD aspect bit in the DEXCR, causing indirect branch prediction to be disabled.h]h_will set the IBRTPD aspect bit in the DEXCR, causing indirect branch prediction to be disabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXThe status returned by ``PR_PPC_GET_DEXCR`` represents what value the process would like applied. It does not include any alternative overrides, such as if the hypervisor is enforcing the aspect be set. To see the true DEXCR state software should read the appropriate SPRs directly. h]h)}(hXThe status returned by ``PR_PPC_GET_DEXCR`` represents what value the process would like applied. It does not include any alternative overrides, such as if the hypervisor is enforcing the aspect be set. To see the true DEXCR state software should read the appropriate SPRs directly.h](hThe status returned by }(hjhhhNhNubj)}(h``PR_PPC_GET_DEXCR``h]hPR_PPC_GET_DEXCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh represents what value the process would like applied. It does not include any alternative overrides, such as if the hypervisor is enforcing the aspect be set. To see the true DEXCR state software should read the appropriate SPRs directly.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hThe aspect state when starting a process is copied from the parent's state on :manpage:`fork(2)`. The state is reset to a fixed value on :manpage:`execve(2)`. The PR_PPC_SET_DEXCR prctl() can control both of these values. h]h)}(hThe aspect state when starting a process is copied from the parent's state on :manpage:`fork(2)`. The state is reset to a fixed value on :manpage:`execve(2)`. The PR_PPC_SET_DEXCR prctl() can control both of these values.h](hPThe aspect state when starting a process is copied from the parent’s state on }(hjhhhNhNubj)}(h:manpage:`fork(2)`h]hfork(2)}(hjhhhNhNubah}(h]h ]jah"]h$]h&]hhj fork(2)jforkjjuh1jhjubh). The state is reset to a fixed value on }(hjhhhNhNubj)}(h:manpage:`execve(2)`h]h execve(2)}(hj hhhNhNubah}(h]h ]jah"]h$]h&]hhj  execve(2)jexecvejjuh1jhjubh@. The PR_PPC_SET_DEXCR prctl() can control both of these values.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hEThe ``*_ONEXEC`` controls do not change the current process's DEXCR. h]h)}(hDThe ``*_ONEXEC`` controls do not change the current process's DEXCR.h](hThe }(hj0hhhNhNubj)}(h ``*_ONEXEC``h]h*_ONEXEC}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh6 controls do not change the current process’s DEXCR.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj,ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKdhjhhubh)}(huUse ``PR_PPC_SET_DEXCR`` with one of ``PR_PPC_DEXCR_CTRL_SET`` or ``PR_PPC_DEXCR_CTRL_CLEAR`` to edit a given aspect.h](hUse }(hj^hhhNhNubj)}(h``PR_PPC_SET_DEXCR``h]hPR_PPC_SET_DEXCR}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubh with one of }(hj^hhhNhNubj)}(h``PR_PPC_DEXCR_CTRL_SET``h]hPR_PPC_DEXCR_CTRL_SET}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubh or }(hj^hhhNhNubj)}(h``PR_PPC_DEXCR_CTRL_CLEAR``h]hPR_PPC_DEXCR_CTRL_CLEAR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubh to edit a given aspect.}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hICommon error codes for both getting and setting the DEXCR are as follows:h]hICommon error codes for both getting and setting the DEXCR are as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]j@)}(hhh](jE)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jDhjubjE)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jDhjubje)}(hhh]jj)}(hhh](jo)}(hhh]h)}(hErrorh]hError}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjubjo)}(hhh]h)}(hMeaningh]hMeaning}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjubeh}(h]h ]h"]h$]h&]uh1jihjubah}(h]h ]h"]h$]h&]uh1jdhjubj)}(hhh](jj)}(hhh](jo)}(hhh]h)}(h ``EINVAL``h]j)}(hjh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhj ubjo)}(hhh]h)}(h)The DEXCR is not supported by the kernel.h]h)The DEXCR is not supported by the kernel.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj0ubah}(h]h ]h"]h$]h&]uh1jnhj ubeh}(h]h ]h"]h$]h&]uh1jihj ubjj)}(hhh](jo)}(hhh]h)}(h ``ENODEV``h]j)}(hjUh]hENODEV}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1hhhhKhjPubah}(h]h ]h"]h$]h&]uh1jnhjMubjo)}(hhh]h)}(hLThe aspect is not recognised by the kernel or not supported by the hardware.h]hLThe aspect is not recognised by the kernel or not supported by the hardware.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjpubah}(h]h ]h"]h$]h&]uh1jnhjMubeh}(h]h ]h"]h$]h&]uh1jihj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j?hjubah}(h]h ]h"]h$]h&]uh1j:hjhhhNhNubh)}(h?``PR_PPC_SET_DEXCR`` may also report the following error codes:h](j)}(h``PR_PPC_SET_DEXCR``h]hPR_PPC_SET_DEXCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh+ may also report the following error codes:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj;)}(hhh]j@)}(hhh](jE)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jDhjubjE)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jDhjubje)}(hhh]jj)}(hhh](jo)}(hhh]h)}(hErrorh]hError}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjubjo)}(hhh]h)}(hMeaningh]hMeaning}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjubeh}(h]h ]h"]h$]h&]uh1jihjubah}(h]h ]h"]h$]h&]uh1jdhjubj)}(hhh](jj)}(hhh](jo)}(hhh]h)}(h ``EINVAL``h]j)}(hj! h]hEINVAL}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jnhj ubjo)}(hhh]h)}(h+The ctrl value contains unrecognised flags.h]h+The ctrl value contains unrecognised flags.}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj< ubah}(h]h ]h"]h$]h&]uh1jnhj ubeh}(h]h ]h"]h$]h&]uh1jihj ubjj)}(hhh](jo)}(hhh]h)}(h ``EINVAL``h]j)}(hja h]hEINVAL}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ ubah}(h]h ]h"]h$]h&]uh1hhhhKhj\ ubah}(h]h ]h"]h$]h&]uh1jnhjY ubjo)}(hhh]h)}(hnThe ctrl value contains mutually conflicting flags (e.g., ``PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR``)h](h:The ctrl value contains mutually conflicting flags (e.g., }(hj hhhNhNubj)}(h3``PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR``h]h/PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj| ubah}(h]h ]h"]h$]h&]uh1jnhjY ubeh}(h]h ]h"]h$]h&]uh1jihj ubjj)}(hhh](jo)}(hhh]h)}(h ``EPERM``h]j)}(hj h]hEPERM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jnhj ubjo)}(hhh]h)}(hrThis aspect cannot be modified with prctl() (check for the PR_PPC_DEXCR_CTRL_EDITABLE flag with PR_PPC_GET_DEXCR).h]hrThis aspect cannot be modified with prctl() (check for the PR_PPC_DEXCR_CTRL_EDITABLE flag with PR_PPC_GET_DEXCR).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jnhj ubeh}(h]h ]h"]h$]h&]uh1jihj ubjj)}(hhh](jo)}(hhh]h)}(h ``EPERM``h]j)}(hj h]hEPERM}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jnhj ubjo)}(hhh]h)}(hThe process does not have sufficient privilege to perform the operation. For example, clearing NPHIE on exec is a privileged operation (a process can still clear its own NPHIE aspect without privileges).h]hThe process does not have sufficient privilege to perform the operation. For example, clearing NPHIE on exec is a privileged operation (a process can still clear its own NPHIE aspect without privileges).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jnhj ubeh}(h]h ]h"]h$]h&]uh1jihj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j?hjubah}(h]h ]h"]h$]h&]uh1j:hjhhhNhNubh)}(hXNThis interface allows a process to control its own DEXCR aspects, and also set the initial DEXCR value for any children in its process tree (up to the next child to use an ``*_ONEXEC`` control). This allows fine-grained control over the default value of the DEXCR, for example allowing containers to run with different default values.h](hThis interface allows a process to control its own DEXCR aspects, and also set the initial DEXCR value for any children in its process tree (up to the next child to use an }(hj> hhhNhNubj)}(h ``*_ONEXEC``h]h*_ONEXEC}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj> ubh control). This allows fine-grained control over the default value of the DEXCR, for example allowing containers to run with different default values.}(hj> hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]prctlah ]h"]prctlah$]h&]uh1hhjhhhhhK(ubeh}(h] configurationah ]h"] configurationah$]h&]uh1hhhhhhhhK%ubh)}(hhh](h)}(hcoredump and ptraceh]hcoredump and ptrace}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn hhhhhKubh)}(hX7The userspace values of the DEXCR and HDEXCR (in this order) are exposed under ``NT_PPC_DEXCR``. These are each 64 bits and readonly, and are intended to assist with core dumps. The DEXCR may be made writable in future. The top 32 bits of both registers (corresponding to the non-userspace bits) are masked off.h](hOThe userspace values of the DEXCR and HDEXCR (in this order) are exposed under }(hj hhhNhNubj)}(h``NT_PPC_DEXCR``h]h NT_PPC_DEXCR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. These are each 64 bits and readonly, and are intended to assist with core dumps. The DEXCR may be made writable in future. The top 32 bits of both registers (corresponding to the non-userspace bits) are masked off.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjn hhubh)}(hXmIf the kernel config ``CONFIG_CHECKPOINT_RESTORE`` is enabled, then ``NT_PPC_HASHKEYR`` is available and exposes the HASHKEYR value of the process for reading and writing. This is a tradeoff between increased security and checkpoint/restore support: a process should normally have no need to know its secret key, but restoring a process requires setting its original key. The key therefore appears in core dumps, and an attacker may be able to retrieve it from a coredump and effectively bypass ROP protection on any threads that share this key (potentially all threads from the same parent that have not run ``exec()``).h](hIf the kernel config }(hj hhhNhNubj)}(h``CONFIG_CHECKPOINT_RESTORE``h]hCONFIG_CHECKPOINT_RESTORE}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is enabled, then }(hj hhhNhNubj)}(h``NT_PPC_HASHKEYR``h]hNT_PPC_HASHKEYR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhX  is available and exposes the HASHKEYR value of the process for reading and writing. This is a tradeoff between increased security and checkpoint/restore support: a process should normally have no need to know its secret key, but restoring a process requires setting its original key. The key therefore appears in core dumps, and an attacker may be able to retrieve it from a coredump and effectively bypass ROP protection on any threads that share this key (potentially all threads from the same parent that have not run }(hj hhhNhNubj)}(h ``exec()``h]hexec()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjn hhubeh}(h]coredump-and-ptraceah ]h"]coredump and ptraceah$]h&]uh1hhhhhhhhKubeh}(h](dexcr-dynamic-execution-control-registerah ]h"]*dexcr (dynamic execution control register)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjnfootnote_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}nameids}(j j jjjk jh jc j` j j u nametypes}(j jjk jc j uh}(j hjhjh jj` jj jn u 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] transformerN include_log] decorationNhhub.