From: Sean Christopherson <seanjc@google.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>,
Michael Ellerman <mpe@ellerman.id.au>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Will Deacon <will@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Sean Christopherson <seanjc@google.com>
Subject: [PATCH v2 0/2] cpu: Fix default mitigation behavior
Date: Fri, 19 Apr 2024 17:05:53 -0700 [thread overview]
Message-ID: <20240420000556.2645001-1-seanjc@google.com> (raw)
Linus, I Cc'd you on this as patch 1 fixes a goof that causes mitigations
to be completely disabled on all !x86 architectures, and it'd be nice to
fix that in rc5. There was a decent bit of discussion on how exactly to
juggle the Kconfigs, and so I don't expect anyone to include this in a pull
request for rc5.
The discussion didn't fully resolve, i.e. this hasn't gotten a thumbs up
from the affected parties, but I think/hope my approach here is minimal
enough for other architectures (just restores previous behavior), and
shouldn't result in a huge amount of churn if we decide to go in a
different direction.
TL;DR: please grab patch 1 directly if you think it's worth squeezing into
rc5, and isn't completely crazy.
Thanks!
Patch 2 is probably 6.9 material, but is definitely not rc5 material. It
disallows retroactively enabling mitigations via command line if the kernel
was built with CPU_MITIGATIONS=n, as it's infeasible for x86 to provide
sane, predictable behavior for this scenario.
v2:
- Rework the Kconfigs so that there's a single user-visible CPU_MITIGATION
config. [Everyone]
- Define CPU_MITIGATIONS in arch/Kconfig. [Josh]
- Completely compile out the cpu_mitigations code if CPU_MITIGATIONS=n,
e.g. to make impossible to end up in a half-baked state where
cpu_mitigations ends up enabled but the kernel wasn't compiled with
mitigations enabled.
v1: https://lore.kernel.org/all/20240417001507.2264512-1-seanjc@google.com
Sean Christopherson (2):
cpu: Re-enable CPU mitigations by default for !X86 architectures
cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n
.../admin-guide/kernel-parameters.txt | 3 +++
arch/Kconfig | 8 ++++++++
arch/x86/Kconfig | 19 ++++++++++++-------
include/linux/cpu.h | 11 +++++++++++
kernel/cpu.c | 13 ++++++++++---
5 files changed, 44 insertions(+), 10 deletions(-)
base-commit: 96fca68c4fbf77a8185eb10f7557e23352732ea2
--
2.44.0.769.g3c40516874-goog
next reply other threads:[~2024-04-20 0:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 0:05 Sean Christopherson [this message]
2024-04-20 0:05 ` [PATCH v2 1/2] cpu: Re-enable CPU mitigations by default for !X86 architectures Sean Christopherson
2024-04-24 5:38 ` Josh Poimboeuf
2024-04-25 14:18 ` [tip: x86/urgent] " tip-bot2 for Sean Christopherson
2024-04-20 0:05 ` [PATCH v2 2/2] cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n Sean Christopherson
2024-04-20 13:36 ` Borislav Petkov
2024-04-24 5:39 ` Josh Poimboeuf
2024-04-24 13:42 ` Borislav Petkov
2024-04-24 15:48 ` Sean Christopherson
2024-04-25 14:18 ` [tip: x86/urgent] " tip-bot2 for Sean Christopherson
2024-04-20 13:33 ` [PATCH v2 0/2] cpu: Fix default mitigation behavior Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240420000556.2645001-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=geert@linux-m68k.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®