From: Greg Kroah-Hartman Date: Fri, 7 Aug 2026 06:23:54 +0000 (+0200) Subject: fuzz cleanups X-Git-Tag: v6.6.151~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76a5e0f1899dd2bd7a6467a281e7e3bf3b2634d2;p=thirdparty%2Fkernel%2Fstable-queue.git fuzz cleanups --- diff --git a/queue-6.1/x86-bugs-enable-ibpb-flush-on-bpf-jit-allocation.patch b/queue-6.1/x86-bugs-enable-ibpb-flush-on-bpf-jit-allocation.patch index c82101acce..ba6c3a9774 100644 --- a/queue-6.1/x86-bugs-enable-ibpb-flush-on-bpf-jit-allocation.patch +++ b/queue-6.1/x86-bugs-enable-ibpb-flush-on-bpf-jit-allocation.patch @@ -25,17 +25,15 @@ Acked-by: Dave Hansen Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin --- - arch/x86/include/asm/nospec-branch.h | 4 +++ - arch/x86/kernel/cpu/bugs.c | 50 +++++++++++++++++++++++++--- + arch/x86/include/asm/nospec-branch.h | 4 ++ + arch/x86/kernel/cpu/bugs.c | 50 +++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 5 deletions(-) -diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h -index 818a5913f21950..40842aabd21783 100644 --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h -@@ -280,6 +280,10 @@ extern void srso_alias_untrain_ret(void); - extern void entry_untrain_ret(void); - extern void entry_ibpb(void); +@@ -293,6 +293,10 @@ void srso_safe_ret(void); + void srso_alias_safe_ret(void); + void handle_interrupted_saferet(struct pt_regs *regs); +#ifdef CONFIG_BPF_JIT +extern void bpf_arch_ibpb(void); @@ -44,8 +42,6 @@ index 818a5913f21950..40842aabd21783 100644 #ifdef CONFIG_X86_64 extern void clear_bhb_loop(void); #endif -diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c -index a0b362ac50a1b3..662d13612ef4b2 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -16,6 +16,7 @@ @@ -56,7 +52,7 @@ index a0b362ac50a1b3..662d13612ef4b2 100644 #include #include -@@ -1298,8 +1299,21 @@ static inline const char *spectre_v2_module_string(void) +@@ -1298,8 +1299,21 @@ static inline const char *spectre_v2_mod { return spectre_v2_bad_module ? " - vulnerable module loaded" : ""; } @@ -78,7 +74,7 @@ index a0b362ac50a1b3..662d13612ef4b2 100644 #endif #define SPECTRE_V2_LFENCE_MSG "WARNING: LFENCE mitigation is not recommended for this CPU, data leaks possible!\n" -@@ -1780,8 +1794,7 @@ static void __init bhi_select_mitigation(void) +@@ -1780,8 +1794,7 @@ static void __init bhi_select_mitigation return; /* Retpoline mitigates against BHI unless the CPU has RRSBA behavior */ @@ -88,7 +84,7 @@ index a0b362ac50a1b3..662d13612ef4b2 100644 spec_ctrl_disable_kernel_rrsba(); if (rrsba_disabled) return; -@@ -1803,6 +1816,27 @@ static void __init bhi_select_mitigation(void) +@@ -1803,6 +1816,27 @@ static void __init bhi_select_mitigation pr_info("Spectre BHI mitigation: SW BHB clearing on syscall\n"); } @@ -116,7 +112,7 @@ index a0b362ac50a1b3..662d13612ef4b2 100644 static void __init spectre_v2_select_mitigation(void) { enum spectre_v2_mitigation_cmd cmd = spectre_v2_parse_cmdline(); -@@ -1985,6 +2019,14 @@ static void __init spectre_v2_select_mitigation(void) +@@ -1985,6 +2019,14 @@ static void __init spectre_v2_select_mit pr_info("Enabling Restricted Speculation for firmware calls\n"); } @@ -131,7 +127,7 @@ index a0b362ac50a1b3..662d13612ef4b2 100644 /* Set up IBPB and STIBP depending on the general spectre V2 command */ spectre_v2_cmd = cmd; } -@@ -3157,9 +3199,7 @@ static const char *spectre_bhi_state(void) +@@ -3157,9 +3199,7 @@ static const char *spectre_bhi_state(voi return "; BHI: BHI_DIS_S"; else if (boot_cpu_has(X86_FEATURE_CLEAR_BHB_LOOP)) return "; BHI: SW loop, KVM: SW loop"; @@ -142,6 +138,3 @@ index a0b362ac50a1b3..662d13612ef4b2 100644 return "; BHI: Retpoline"; else if (boot_cpu_has(X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT)) return "; BHI: Vulnerable, KVM: SW loop"; --- -2.53.0 -