x86/bugs: Rename CONFIG_CPU_IBRS_ENTRY => CONFIG_MITIGATION_IBRS_ENTRY
authorBreno Leitao <leitao@debian.org>
Tue, 21 Nov 2023 16:07:35 +0000 (08:07 -0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 10 Jan 2024 09:52:29 +0000 (10:52 +0100)
Step 8/10 of the namespace unification of CPU mitigations related Kconfig options.

Suggested-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20231121160740.1249350-9-leitao@debian.org
arch/x86/Kconfig
arch/x86/entry/calling.h
arch/x86/kernel/cpu/bugs.c

index 77b8769f302615d209331c4a5aae5a6e55e22c34..60d38df26f007951c7bc0bc516893cf66df61f2b 100644 (file)
@@ -2561,7 +2561,7 @@ config MITIGATION_IBPB_ENTRY
        help
          Compile the kernel with support for the retbleed=ibpb mitigation.
 
-config CPU_IBRS_ENTRY
+config MITIGATION_IBRS_ENTRY
        bool "Enable IBRS on kernel entry"
        depends on CPU_SUP_INTEL && X86_64
        default y
index 7ac2d6f946ed07caf1e1f1be9be510ca4bbfb6a0..39e069b68c6eeaa24540cb8065da32e859a5865c 100644 (file)
@@ -303,7 +303,7 @@ For 32-bit we have the following conventions - kernel is built with
  * Assumes x86_spec_ctrl_{base,current} to have SPEC_CTRL_IBRS set.
  */
 .macro IBRS_ENTER save_reg
-#ifdef CONFIG_CPU_IBRS_ENTRY
+#ifdef CONFIG_MITIGATION_IBRS_ENTRY
        ALTERNATIVE "jmp .Lend_\@", "", X86_FEATURE_KERNEL_IBRS
        movl    $MSR_IA32_SPEC_CTRL, %ecx
 
@@ -332,7 +332,7 @@ For 32-bit we have the following conventions - kernel is built with
  * regs. Must be called after the last RET.
  */
 .macro IBRS_EXIT save_reg
-#ifdef CONFIG_CPU_IBRS_ENTRY
+#ifdef CONFIG_MITIGATION_IBRS_ENTRY
        ALTERNATIVE "jmp .Lend_\@", "", X86_FEATURE_KERNEL_IBRS
        movl    $MSR_IA32_SPEC_CTRL, %ecx
 
index 2580368c32d1fa6efaca461dcaa9cd76236efbd6..e11bacbd8f3938d9a5695bc1f00b9109cc14f47c 100644 (file)
@@ -1439,7 +1439,7 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void)
                return SPECTRE_V2_CMD_AUTO;
        }
 
-       if (cmd == SPECTRE_V2_CMD_IBRS && !IS_ENABLED(CONFIG_CPU_IBRS_ENTRY)) {
+       if (cmd == SPECTRE_V2_CMD_IBRS && !IS_ENABLED(CONFIG_MITIGATION_IBRS_ENTRY)) {
                pr_err("%s selected but not compiled in. Switching to AUTO select\n",
                       mitigation_options[i].option);
                return SPECTRE_V2_CMD_AUTO;
@@ -1565,7 +1565,7 @@ static void __init spectre_v2_select_mitigation(void)
                        break;
                }
 
-               if (IS_ENABLED(CONFIG_CPU_IBRS_ENTRY) &&
+               if (IS_ENABLED(CONFIG_MITIGATION_IBRS_ENTRY) &&
                    boot_cpu_has_bug(X86_BUG_RETBLEED) &&
                    retbleed_cmd != RETBLEED_CMD_OFF &&
                    retbleed_cmd != RETBLEED_CMD_STUFF &&