Commit 98fdaeb
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
Change the default value of spectre v2 in user mode to respect the
CONFIG_MITIGATION_SPECTRE_V2 config option.
Currently, user mode spectre v2 is set to auto
(SPECTRE_V2_USER_CMD_AUTO) by default, even if
CONFIG_MITIGATION_SPECTRE_V2 is disabled.
Set the spectre_v2 value to auto (SPECTRE_V2_USER_CMD_AUTO) if the
Spectre v2 config (CONFIG_MITIGATION_SPECTRE_V2) is enabled, otherwise
set the value to none (SPECTRE_V2_USER_CMD_NONE).
Important to say the command line argument "spectre_v2_user" overwrites
the default value in both cases.
When CONFIG_MITIGATION_SPECTRE_V2 is not set, users have the flexibility
to opt-in for specific mitigations independently. In this scenario,
setting spectre_v2= will not enable spectre_v2_user=, and command line
options spectre_v2_user and spectre_v2 are independent when
CONFIG_MITIGATION_SPECTRE_V2=n.
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Kaplan <David.Kaplan@amd.com>
Link: https://lore.kernel.org/r/20241031-x86_bugs_last_v2-v2-2-b7ff1dab840e@debian.org1 parent 2a08b83 commit 98fdaeb
2 files changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6582 | 6582 | | |
6583 | 6583 | | |
6584 | 6584 | | |
| 6585 | + | |
| 6586 | + | |
6585 | 6587 | | |
6586 | 6588 | | |
6587 | 6589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
| 1311 | + | |
1311 | 1312 | | |
1312 | 1313 | | |
1313 | 1314 | | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1314 | 1318 | | |
1315 | 1319 | | |
1316 | 1320 | | |
| |||
1323 | 1327 | | |
1324 | 1328 | | |
1325 | 1329 | | |
1326 | | - | |
| 1330 | + | |
1327 | 1331 | | |
1328 | 1332 | | |
1329 | 1333 | | |
| |||
1333 | 1337 | | |
1334 | 1338 | | |
1335 | 1339 | | |
1336 | | - | |
1337 | | - | |
| 1340 | + | |
| 1341 | + | |
1338 | 1342 | | |
1339 | 1343 | | |
1340 | 1344 | | |
| |||
0 commit comments