From: Greg Kroah-Hartman Date: Fri, 20 Jun 2025 14:40:31 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v5.4.295~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85ec7a6be8d8350f6429dd3560f74838e75c6a24;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: revert-x86-bugs-make-spectre-user-default-depend-on-mitigation_spectre_v2-on-v6.6-and-older.patch --- diff --git a/queue-6.1/revert-x86-bugs-make-spectre-user-default-depend-on-mitigation_spectre_v2-on-v6.6-and-older.patch b/queue-6.1/revert-x86-bugs-make-spectre-user-default-depend-on-mitigation_spectre_v2-on-v6.6-and-older.patch new file mode 100644 index 0000000000..828aa16afc --- /dev/null +++ b/queue-6.1/revert-x86-bugs-make-spectre-user-default-depend-on-mitigation_spectre_v2-on-v6.6-and-older.patch @@ -0,0 +1,90 @@ +From leitao@debian.org Fri Jun 20 16:37:13 2025 +From: Breno Leitao +Date: Fri, 20 Jun 2025 06:51:23 -0700 +Subject: Revert "x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2" on v6.6 and older +To: Jonathan Corbet , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , stable@vger.kernel.org +Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, David.Kaplan@amd.com, mingo@kernel.org, brad.spengler@opensrcsec.com, Brad Spengler , Salvatore Bonaccorso , Breno Leitao +Message-ID: <20250620-stable_revert_66-v1-1-841800dd2c68@debian.org> + +From: Breno Leitao + +This reverts commit 594dbf0a19d607f106ed552332b9b8fecd2b64a3 which is +commit 98fdaeb296f51ef08e727a7cc72e5b5c864c4f4d upstream. + +commit 7adb96687ce8 ("x86/bugs: Make spectre user default depend on +MITIGATION_SPECTRE_V2") depends on commit 72c70f480a70 ("x86/bugs: Add +a separate config for Spectre V2"), which introduced +MITIGATION_SPECTRE_V2. + +commit 72c70f480a70 ("x86/bugs: Add a separate config for Spectre V2") +never landed in stable tree, thus, stable tree doesn't have +MITIGATION_SPECTRE_V2, that said, commit 7adb96687ce8 ("x86/bugs: Make +spectre user default depend on MITIGATION_SPECTRE_V2") has no value if +the dependecy was not applied. + +Revert commit 7adb96687ce8 ("x86/bugs: Make spectre user default +depend on MITIGATION_SPECTRE_V2") in stable kernel which landed in in +5.4.294, 5.10.238, 5.15.185, 6.1.141 and 6.6.93 stable versions. + +Cc: David.Kaplan@amd.com +Cc: peterz@infradead.org +Cc: pawan.kumar.gupta@linux.intel.com +Cc: mingo@kernel.org +Cc: brad.spengler@opensrcsec.com +Cc: stable@vger.kernel.org # 6.6 6.1 5.15 5.10 5.4 +Reported-by: Brad Spengler +Reported-by: Salvatore Bonaccorso +Signed-off-by: Breno Leitao +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/admin-guide/kernel-parameters.txt | 2 -- + arch/x86/kernel/cpu/bugs.c | 10 +++------- + 2 files changed, 3 insertions(+), 9 deletions(-) + +--- a/Documentation/admin-guide/kernel-parameters.txt ++++ b/Documentation/admin-guide/kernel-parameters.txt +@@ -5780,8 +5780,6 @@ + + Selecting 'on' will also enable the mitigation + against user space to user space task attacks. +- Selecting specific mitigation does not force enable +- user mitigations. + + Selecting 'off' will disable both the kernel and + the user space protections. +--- a/arch/x86/kernel/cpu/bugs.c ++++ b/arch/x86/kernel/cpu/bugs.c +@@ -1382,13 +1382,9 @@ static __ro_after_init enum spectre_v2_m + static enum spectre_v2_user_cmd __init + spectre_v2_parse_user_cmdline(void) + { +- enum spectre_v2_user_cmd mode; + char arg[20]; + int ret, i; + +- mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ? +- SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE; +- + switch (spectre_v2_cmd) { + case SPECTRE_V2_CMD_NONE: + return SPECTRE_V2_USER_CMD_NONE; +@@ -1401,7 +1397,7 @@ spectre_v2_parse_user_cmdline(void) + ret = cmdline_find_option(boot_command_line, "spectre_v2_user", + arg, sizeof(arg)); + if (ret < 0) +- return mode; ++ return SPECTRE_V2_USER_CMD_AUTO; + + for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) { + if (match_option(arg, ret, v2_user_options[i].option)) { +@@ -1411,8 +1407,8 @@ spectre_v2_parse_user_cmdline(void) + } + } + +- pr_err("Unknown user space protection option (%s). Switching to default\n", arg); +- return mode; ++ pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg); ++ return SPECTRE_V2_USER_CMD_AUTO; + } + + static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode) diff --git a/queue-6.1/series b/queue-6.1/series index f218470552..69071c1f6f 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -439,3 +439,4 @@ revert-bus-ti-sysc-probe-for-l4_wkup-and-l4_cfg-inte.patch platform-x86-dell_rbu-fix-list-usage.patch platform-x86-dell_rbu-stop-overwriting-data-buffer.patch powerpc-eeh-fix-missing-pe-bridge-reconfiguration-du.patch +revert-x86-bugs-make-spectre-user-default-depend-on-mitigation_spectre_v2-on-v6.6-and-older.patch