Commit ce0abef
cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n
Explicitly disallow enabling mitigations at runtime for kernels that were
built with CONFIG_CPU_MITIGATIONS=n, as some architectures may omit code
entirely if mitigations are disabled at compile time.
E.g. on x86, a large pile of Kconfigs are buried behind CPU_MITIGATIONS,
and trying to provide sane behavior for retroactively enabling mitigations
is extremely difficult, bordering on impossible. E.g. page table isolation
and call depth tracking require build-time support, BHI mitigations will
still be off without additional kernel parameters, etc.
[ bp: Touchups. ]
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Acked-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent fe42754 commit ce0abef
File tree
4 files changed
+30
-6
lines changed- Documentation/admin-guide
- arch/x86
- include/linux
- kernel
4 files changed
+30
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3423 | 3423 | | |
3424 | 3424 | | |
3425 | 3425 | | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
3426 | 3429 | | |
3427 | 3430 | | |
3428 | 3431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2495 | 2495 | | |
2496 | 2496 | | |
2497 | 2497 | | |
| 2498 | + | |
| 2499 | + | |
2498 | 2500 | | |
2499 | | - | |
2500 | | - | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
2501 | 2505 | | |
2502 | 2506 | | |
2503 | 2507 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
226 | 237 | | |
227 | 238 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3196 | 3196 | | |
3197 | 3197 | | |
3198 | 3198 | | |
| 3199 | + | |
3199 | 3200 | | |
3200 | 3201 | | |
3201 | 3202 | | |
| |||
3206 | 3207 | | |
3207 | 3208 | | |
3208 | 3209 | | |
3209 | | - | |
3210 | | - | |
3211 | | - | |
| 3210 | + | |
3212 | 3211 | | |
3213 | 3212 | | |
3214 | 3213 | | |
| |||
3224 | 3223 | | |
3225 | 3224 | | |
3226 | 3225 | | |
3227 | | - | |
3228 | 3226 | | |
3229 | 3227 | | |
3230 | 3228 | | |
| |||
3239 | 3237 | | |
3240 | 3238 | | |
3241 | 3239 | | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
0 commit comments