| .. | .. |
|---|
| 28 | 28 | which is selected with arg2 of prctl(2). The return value uses bits 0-3 with |
|---|
| 29 | 29 | the following meaning: |
|---|
| 30 | 30 | |
|---|
| 31 | | -==== ===================== =================================================== |
|---|
| 32 | | -Bit Define Description |
|---|
| 33 | | -==== ===================== =================================================== |
|---|
| 34 | | -0 PR_SPEC_PRCTL Mitigation can be controlled per task by |
|---|
| 35 | | - PR_SET_SPECULATION_CTRL. |
|---|
| 36 | | -1 PR_SPEC_ENABLE The speculation feature is enabled, mitigation is |
|---|
| 37 | | - disabled. |
|---|
| 38 | | -2 PR_SPEC_DISABLE The speculation feature is disabled, mitigation is |
|---|
| 39 | | - enabled. |
|---|
| 40 | | -3 PR_SPEC_FORCE_DISABLE Same as PR_SPEC_DISABLE, but cannot be undone. A |
|---|
| 41 | | - subsequent prctl(..., PR_SPEC_ENABLE) will fail. |
|---|
| 42 | | -==== ===================== =================================================== |
|---|
| 31 | +==== ====================== ================================================== |
|---|
| 32 | +Bit Define Description |
|---|
| 33 | +==== ====================== ================================================== |
|---|
| 34 | +0 PR_SPEC_PRCTL Mitigation can be controlled per task by |
|---|
| 35 | + PR_SET_SPECULATION_CTRL. |
|---|
| 36 | +1 PR_SPEC_ENABLE The speculation feature is enabled, mitigation is |
|---|
| 37 | + disabled. |
|---|
| 38 | +2 PR_SPEC_DISABLE The speculation feature is disabled, mitigation is |
|---|
| 39 | + enabled. |
|---|
| 40 | +3 PR_SPEC_FORCE_DISABLE Same as PR_SPEC_DISABLE, but cannot be undone. A |
|---|
| 41 | + subsequent prctl(..., PR_SPEC_ENABLE) will fail. |
|---|
| 42 | +4 PR_SPEC_DISABLE_NOEXEC Same as PR_SPEC_DISABLE, but the state will be |
|---|
| 43 | + cleared on :manpage:`execve(2)`. |
|---|
| 44 | +==== ====================== ================================================== |
|---|
| 43 | 45 | |
|---|
| 44 | 46 | If all bits are 0 the CPU is not affected by the speculation misfeature. |
|---|
| 45 | 47 | |
|---|
| .. | .. |
|---|
| 94 | 96 | * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE, 0, 0); |
|---|
| 95 | 97 | * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0); |
|---|
| 96 | 98 | * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_FORCE_DISABLE, 0, 0); |
|---|
| 99 | + * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE_NOEXEC, 0, 0); |
|---|
| 97 | 100 | |
|---|
| 98 | 101 | - PR_SPEC_INDIR_BRANCH: Indirect Branch Speculation in User Processes |
|---|
| 99 | 102 | (Mitigate Spectre V2 style attacks against user processes) |
|---|