Messages in this thread Patch in this message | | | Date | Fri, 19 Apr 2024 17:09:31 -0700 | Subject | Re: [PATCH v4 2/5] cpu/speculation: Fix CPU mitigation defaults for !x86 | From | Sean Christopherson <> |
| |
On Fri, Apr 19, 2024, Josh Poimboeuf wrote: > CPU speculative execution mitigations were inadvertently disabled on > non-x86 arches by the following commit: > > f337a6a21e2f ("x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n") > > Fix it by replacing CONFIG_SPECULATION_MITIGATIONS with a new generic > CONFIG_CPU_MITIGATIONS option and moving the x86-specific mitigations to > a separate menu which depends on CONFIG_CPU_MITIGATIONS.
Ah drat, I didn't check my mailbox until after Cc'ing Linus my own version[*].
I don't have a strong preference between the two, though I do think it's worth nothing that this will (obvioulsy) allow disabling mitigations at compile time on all architectures, which may or may not be desirable.
[*] https://lore.kernel.org/all/20240420000556.2645001-2-seanjc@google.com
> Fixes: f337a6a21e2f ("x86/cpu: Actually turn off mitigations by default for SPECULATION_MITIGATIONS=n") > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Reported-by: Michael Ellerman <mpe@ellerman.id.au> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > Closes: https://lkml.kernel.org/r/20240413115324.53303a68%40canb.auug.org.au > Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> > --- > arch/Kconfig | 10 ++++++++++ > arch/x86/Kconfig | 15 +++------------ > kernel/cpu.c | 4 ++-- > 3 files changed, 15 insertions(+), 14 deletions(-) > > diff --git a/arch/Kconfig b/arch/Kconfig > index 9f066785bb71..5c96849eb957 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -11,6 +11,16 @@ source "arch/$(SRCARCH)/Kconfig" > > menu "General architecture-dependent options" > > +config CPU_MITIGATIONS > + bool "Mitigations for CPU speculative execution vulnerabilities" > + default y > + help > + Say Y here to enable mitigations for CPU speculative execution > + vulnerabilities. > + > + If you say N, all mitigations will be disabled. You really > + should know what you are doing to say so.
| |