Lines Matching +full:run +full:- +full:control

1 .. SPDX-License-Identifier: GPL-2.0-or-later
4 DEXCR (Dynamic Execution Control Register)
11 PowerPC ISA 3.1B (Power10) that allows per-cpu control over several dynamic
13 branch target prediction) and enabling return-oriented programming (ROP)
16 The execution control is exposed in hardware as up to 32 bits ('aspects') in
22 A privileged SPR that can control aspects for userspace and kernel space
24 A hypervisor-privileged SPR that can control aspects for the hypervisor and
27 An optional ultravisor-privileged SPR that can control aspects for the ultravisor.
30 provides a non-privileged read-only view of the userspace DEXCR aspects.
31 There is also an SPR that provides a read-only view of the hypervisor enforced
40 -----
42 A process can control its own userspace DEXCR value using the
52 .. flat-table::
53 :header-rows: 1
56 * - ``prctl()`` which
57 - Aspect name
58 - Aspect index
60 * - ``PR_PPC_DEXCR_SBHE``
61 - Speculative Branch Hint Enable (SBHE)
62 - 0
64 * - ``PR_PPC_DEXCR_IBRTPD``
65 - Indirect Branch Recurrent Target Prediction Disable (IBRTPD)
66 - 3
68 * - ``PR_PPC_DEXCR_SRAPD``
69 - Subroutine Return Address Prediction Disable (SRAPD)
70 - 4
72 * - ``PR_PPC_DEXCR_NPHIE``
73 - Non-Privileged Hash Instruction Enable (NPHIE)
74 - 5
76 .. flat-table::
77 :header-rows: 1
80 * - ``prctl()`` ctrl
81 - Meaning
83 * - ``PR_PPC_DEXCR_CTRL_EDITABLE``
84 - This aspect can be configured with PR_PPC_SET_DEXCR (get only)
86 * - ``PR_PPC_DEXCR_CTRL_SET``
87 - This aspect is set / set this aspect
89 * - ``PR_PPC_DEXCR_CTRL_CLEAR``
90 - This aspect is clear / clear this aspect
92 * - ``PR_PPC_DEXCR_CTRL_SET_ONEXEC``
93 - This aspect will be set after exec / set this aspect after exec
95 * - ``PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC``
96 - This aspect will be clear after exec / clear this aspect after exec
106 set, it will be cleared when you run exec, and you can change this with the
124 :manpage:`execve(2)`. The PR_PPC_SET_DEXCR prctl() can control both of these
134 .. flat-table::
135 :header-rows: 1
138 * - Error
139 - Meaning
141 * - ``EINVAL``
142 - The DEXCR is not supported by the kernel.
144 * - ``ENODEV``
145 - The aspect is not recognised by the kernel or not supported by the
150 .. flat-table::
151 :header-rows: 1
154 * - Error
155 - Meaning
157 * - ``EINVAL``
158 - The ctrl value contains unrecognised flags.
160 * - ``EINVAL``
161 - The ctrl value contains mutually conflicting flags (e.g.,
164 * - ``EPERM``
165 - This aspect cannot be modified with prctl() (check for the
168 * - ``EPERM``
169 - The process does not have sufficient privilege to perform the operation.
173 This interface allows a process to control its own DEXCR aspects, and also set
175 child to use an ``*_ONEXEC`` control). This allows fine-grained control over the
176 default value of the DEXCR, for example allowing containers to run with different
186 bits of both registers (corresponding to the non-userspace bits) are masked off.
195 key (potentially all threads from the same parent that have not run ``exec()``).