@@ -2477,12 +2477,12 @@ config CALL_PADDING
24772477
24782478config FINEIBT
24792479 def_bool y
2480- depends on X86_KERNEL_IBT && CFI_CLANG && RETPOLINE
2480+ depends on X86_KERNEL_IBT && CFI_CLANG && MITIGATION_RETPOLINE
24812481 select CALL_PADDING
24822482
24832483config HAVE_CALL_THUNKS
24842484 def_bool y
2485- depends on CC_HAS_ENTRY_PADDING && RETHUNK && OBJTOOL
2485+ depends on CC_HAS_ENTRY_PADDING && MITIGATION_RETHUNK && OBJTOOL
24862486
24872487config CALL_THUNKS
24882488 def_bool n
@@ -2504,7 +2504,7 @@ menuconfig SPECULATION_MITIGATIONS
25042504
25052505if SPECULATION_MITIGATIONS
25062506
2507- config PAGE_TABLE_ISOLATION
2507+ config MITIGATION_PAGE_TABLE_ISOLATION
25082508 bool "Remove the kernel mapping in user mode"
25092509 default y
25102510 depends on (X86_64 || X86_PAE)
@@ -2515,7 +2515,7 @@ config PAGE_TABLE_ISOLATION
25152515
25162516 See Documentation/arch/x86/pti.rst for more details.
25172517
2518- config RETPOLINE
2518+ config MITIGATION_RETPOLINE
25192519 bool "Avoid speculative indirect branches in kernel"
25202520 select OBJTOOL if HAVE_OBJTOOL
25212521 default y
@@ -2525,9 +2525,9 @@ config RETPOLINE
25252525 branches. Requires a compiler with -mindirect-branch=thunk-extern
25262526 support for full protection. The kernel may run slower.
25272527
2528- config RETHUNK
2528+ config MITIGATION_RETHUNK
25292529 bool "Enable return-thunks"
2530- depends on RETPOLINE && CC_HAS_RETURN_THUNK
2530+ depends on MITIGATION_RETPOLINE && CC_HAS_RETURN_THUNK
25312531 select OBJTOOL if HAVE_OBJTOOL
25322532 default y if X86_64
25332533 help
@@ -2536,14 +2536,14 @@ config RETHUNK
25362536 Requires a compiler with -mfunction-return=thunk-extern
25372537 support for full protection. The kernel may run slower.
25382538
2539- config CPU_UNRET_ENTRY
2539+ config MITIGATION_UNRET_ENTRY
25402540 bool "Enable UNRET on kernel entry"
2541- depends on CPU_SUP_AMD && RETHUNK && X86_64
2541+ depends on CPU_SUP_AMD && MITIGATION_RETHUNK && X86_64
25422542 default y
25432543 help
25442544 Compile the kernel with support for the retbleed=unret mitigation.
25452545
2546- config CALL_DEPTH_TRACKING
2546+ config MITIGATION_CALL_DEPTH_TRACKING
25472547 bool "Mitigate RSB underflow with call depth tracking"
25482548 depends on CPU_SUP_INTEL && HAVE_CALL_THUNKS
25492549 select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
@@ -2563,7 +2563,7 @@ config CALL_DEPTH_TRACKING
25632563
25642564config CALL_THUNKS_DEBUG
25652565 bool "Enable call thunks and call depth tracking debugging"
2566- depends on CALL_DEPTH_TRACKING
2566+ depends on MITIGATION_CALL_DEPTH_TRACKING
25672567 select FUNCTION_ALIGNMENT_32B
25682568 default n
25692569 help
@@ -2574,14 +2574,14 @@ config CALL_THUNKS_DEBUG
25742574 Only enable this when you are debugging call thunks as this
25752575 creates a noticeable runtime overhead. If unsure say N.
25762576
2577- config CPU_IBPB_ENTRY
2577+ config MITIGATION_IBPB_ENTRY
25782578 bool "Enable IBPB on kernel entry"
25792579 depends on CPU_SUP_AMD && X86_64
25802580 default y
25812581 help
25822582 Compile the kernel with support for the retbleed=ibpb mitigation.
25832583
2584- config CPU_IBRS_ENTRY
2584+ config MITIGATION_IBRS_ENTRY
25852585 bool "Enable IBRS on kernel entry"
25862586 depends on CPU_SUP_INTEL && X86_64
25872587 default y
@@ -2590,14 +2590,14 @@ config CPU_IBRS_ENTRY
25902590 This mitigates both spectre_v2 and retbleed at great cost to
25912591 performance.
25922592
2593- config CPU_SRSO
2593+ config MITIGATION_SRSO
25942594 bool "Mitigate speculative RAS overflow on AMD"
2595- depends on CPU_SUP_AMD && X86_64 && RETHUNK
2595+ depends on CPU_SUP_AMD && X86_64 && MITIGATION_RETHUNK
25962596 default y
25972597 help
25982598 Enable the SRSO mitigation needed on AMD Zen1-4 machines.
25992599
2600- config SLS
2600+ config MITIGATION_SLS
26012601 bool "Mitigate Straight-Line-Speculation"
26022602 depends on CC_HAS_SLS && X86_64
26032603 select OBJTOOL if HAVE_OBJTOOL
@@ -2607,7 +2607,7 @@ config SLS
26072607 against straight line speculation. The kernel image might be slightly
26082608 larger.
26092609
2610- config GDS_FORCE_MITIGATION
2610+ config MITIGATION_GDS_FORCE
26112611 bool "Force GDS Mitigation"
26122612 depends on CPU_SUP_INTEL
26132613 default n
0 commit comments