hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/x86/Kconfig
....@@ -15,7 +15,6 @@
1515 select CLKSRC_I8253
1616 select CLONE_BACKWARDS
1717 select HAVE_DEBUG_STACKOVERFLOW
18
- select KMAP_LOCAL
1918 select MODULES_USE_ELF_REL
2019 select OLD_SIGACTION
2120 select GENERIC_VDSO_32
....@@ -61,6 +60,7 @@
6160 select ARCH_32BIT_OFF_T if X86_32
6261 select ARCH_CLOCKSOURCE_INIT
6362 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
63
+ select ARCH_HAS_CPU_FINALIZE_INIT
6464 select ARCH_HAS_DEBUG_VIRTUAL
6565 select ARCH_HAS_DEBUG_VM_PGTABLE if !X86_PAE
6666 select ARCH_HAS_DEVMEM_IS_ALLOWED
....@@ -218,7 +218,6 @@
218218 select HAVE_PCI
219219 select HAVE_PERF_REGS
220220 select HAVE_PERF_USER_STACK_DUMP
221
- select HAVE_PREEMPT_LAZY
222221 select MMU_GATHER_RCU_TABLE_FREE if PARAVIRT
223222 select HAVE_POSIX_CPU_TIMERS_TASK_WORK
224223 select HAVE_REGS_AND_STACK_ACCESS_API
....@@ -1338,17 +1337,16 @@
13381337 If you select this option, microcode patch loading support for AMD
13391338 processors will be enabled.
13401339
1341
-config MICROCODE_OLD_INTERFACE
1342
- bool "Ancient loading interface (DEPRECATED)"
1340
+config MICROCODE_LATE_LOADING
1341
+ bool "Late microcode loading (DANGEROUS)"
13431342 default n
13441343 depends on MICROCODE
13451344 help
1346
- DO NOT USE THIS! This is the ancient /dev/cpu/microcode interface
1347
- which was used by userspace tools like iucode_tool and microcode.ctl.
1348
- It is inadequate because it runs too late to be able to properly
1349
- load microcode on a machine and it needs special tools. Instead, you
1350
- should've switched to the early loading method with the initrd or
1351
- builtin microcode by now: Documentation/x86/microcode.rst
1345
+ Loading microcode late, when the system is up and executing instructions
1346
+ is a tricky business and should be avoided if possible. Just the sequence
1347
+ of synchronizing all cores and SMT threads is one fragile dance which does
1348
+ not guarantee that cores might not softlock after the loading. Therefore,
1349
+ use this at your own risk. Late loading taints the kernel too.
13521350
13531351 config X86_MSR
13541352 tristate "/dev/cpu/*/msr - Model-specific register support"
....@@ -2485,6 +2483,13 @@
24852483 This mitigates both spectre_v2 and retbleed at great cost to
24862484 performance.
24872485
2486
+config CPU_SRSO
2487
+ bool "Mitigate speculative RAS overflow on AMD"
2488
+ depends on CPU_SUP_AMD && X86_64 && RETHUNK
2489
+ default y
2490
+ help
2491
+ Enable the SRSO mitigation needed on AMD Zen1-4 machines.
2492
+
24882493 config SLS
24892494 bool "Mitigate Straight-Line-Speculation"
24902495 depends on CC_HAS_SLS && X86_64
....@@ -2494,6 +2499,25 @@
24942499 against straight line speculation. The kernel image might be slightly
24952500 larger.
24962501
2502
+config GDS_FORCE_MITIGATION
2503
+ bool "Force GDS Mitigation"
2504
+ depends on CPU_SUP_INTEL
2505
+ default n
2506
+ help
2507
+ Gather Data Sampling (GDS) is a hardware vulnerability which allows
2508
+ unprivileged speculative access to data which was previously stored in
2509
+ vector registers.
2510
+
2511
+ This option is equivalent to setting gather_data_sampling=force on the
2512
+ command line. The microcode mitigation is used if present, otherwise
2513
+ AVX is disabled as a mitigation. On affected systems that are missing
2514
+ the microcode any userspace code that unconditionally uses AVX will
2515
+ break with this option set.
2516
+
2517
+ Setting this option on systems not vulnerable to GDS has no effect.
2518
+
2519
+ If in doubt, say N.
2520
+
24972521 endif
24982522
24992523 config ARCH_HAS_ADD_PAGES