[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<LV3PR12MB9265D0A464C2F597219A7B1294EBA@LV3PR12MB9265.namprd12.prod.outlook.com>
Date: Tue, 14 Oct 2025 18:06:48 +0000
From: "Kaplan, David" <David.Kaplan@....com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>, Pawan Gupta
<pawan.kumar.gupta@...ux.intel.com>, Ingo Molnar <mingo@...hat.com>, Dave
Hansen <dave.hansen@...ux.intel.com>, "x86@...nel.org" <x86@...nel.org>, "H .
Peter Anvin" <hpa@...or.com>, Alexander Graf <graf@...zon.com>, Boris
Ostrovsky <boris.ostrovsky@...cle.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH 00/56] Dynamic mitigations
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Josh Poimboeuf <jpoimboe@...nel.org>
> Sent: Tuesday, October 14, 2025 11:29 AM
> To: Kaplan, David <David.Kaplan@....com>
> Cc: Thomas Gleixner <tglx@...utronix.de>; Borislav Petkov <bp@...en8.de>; Peter
> Zijlstra <peterz@...radead.org>; Pawan Gupta
> <pawan.kumar.gupta@...ux.intel.com>; Ingo Molnar <mingo@...hat.com>; Dave
> Hansen <dave.hansen@...ux.intel.com>; x86@...nel.org; H . Peter Anvin
> <hpa@...or.com>; Alexander Graf <graf@...zon.com>; Boris Ostrovsky
> <boris.ostrovsky@...cle.com>; linux-kernel@...r.kernel.org
> Subject: Re: [RFC PATCH 00/56] Dynamic mitigations
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Mon, Oct 13, 2025 at 09:33:48AM -0500, David Kaplan wrote:
> > Dynamic mitigations enables changing the kernel CPU security mitigations at
> > runtime without a reboot/kexec.
> >
> > Previously, mitigation choices had to be made on the kernel cmdline. With
> > this feature an administrator can select new mitigation choices by writing
> > a sysfs file, after which the kernel will re-patch itself based on the new
> > mitigations.
> >
> > As the performance cost of CPU mitigations can be significant, selecting
> > the right set of mitigations is important to achieve the correct balance of
> > performance/security.
> >
> > Use
> > ---
> > As described in the supplied documentation file, new mitigations are
> > selected by writing cmdline options to a new sysfs file. Only cmdline
> > options related to mitigations are recognized via this interface. All
> > previous mitigation-related cmdline options are ignored and selections are
> > done based on the new options.
> >
> > Examples:
> > echo "mitigations=off" > /sys/devices/system/cpu/mitigations
> > echo "spectre_v2=retpoline tsa=off" > /sys/devices/system/cpu/mitigations
> >
> >
> > There are several use cases that will benefit from dynamic mitigations:
> >
> > Use Cases
> > ---------
> > 1. Runtime Policy
> >
> > Some workflows rely on booting a generic kernel before customizing the system.
> > cloud-init is a popular example of this where a VM is started typically with
> > default settings and then is customized based on a customer-provided
> > configuration file.
>
> I'm not really a fan of this. It adds complexity to some areas that are
> already struggling with too much complexity.
>
> IMO this would need some REALLY strong justification, more than just
> "hey, this makes things more convenient."
>
> The mitigations should be a "set it and forget it" thing. I don't see
> anything here which justifies the considerable maintenance burden this
> would add for all existing and future mitigations.
>
The problem is there are environments like the one outlined where you can't just 'set it and forget it' because the kernel needs it set at boot-time, but in these environments you don't know how to configure the system until much later in boot. So you end up running with the default settings all the time, even if you don't need them. And the default settings can have significant performance impacts in many cases.
The cloud guys on this thread may be able to offer some additional color here since I believe that's where you're most likely to have this situation.
--David Kaplan
Powered by blists - more mailing lists