Thread (20 messages) 20 messages, 4 authors, 2025-11-07

Re: [PATCH v2 2/2] cpu: fix hard lockup triggered by printk calls within scheduling context

From: Will Deacon <will@kernel.org>
Date: 2025-10-30 14:50:12
Also in: lkml

On Wed, Oct 29, 2025 at 11:45:54AM +0800, shechenglong wrote:
quoted hunk ↗ jump to hunk
@@ -1197,3 +1185,15 @@ void unpriv_ebpf_notify(int new_state)
                pr_err("WARNING: %s", EBPF_WARN);
 }
 #endif
+
+void spectre_print_disabled_mitigations(void)
+{
+       if (spectre_v2_mitigations_off())
+               pr_info("spectre-v2 mitigation disabled by command-line option\n");
+
+       if (spectre_v4_mitigations_off())
+               pr_info("spectre-v4 mitigation disabled by command-line option\n");
+
+       if (__nospectre_bhb || cpu_mitigations_off())
+               pr_info("spectre-bhb mitigation disabled by command-line option\n");
Is the compiler smart enough to store a single string for the "mitigation
disabled by command-line option\n" part? If not, you might want to use %s
to avoid wasting memory. (I was going to check with llvm but I'm unable
to apply your changes due to whitespace corruption).

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help