[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<LV3PR12MB9265F32424F982EEAF542A9D94FCA@LV3PR12MB9265.namprd12.prod.outlook.com>
Date: Mon, 27 Oct 2025 13:59:44 +0000
From: "Kaplan, David" <David.Kaplan@....com>
To: Nikolay Borisov <nik.borisov@...e.com>, Thomas Gleixner
<tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>, Peter Zijlstra
<peterz@...radead.org>, Josh Poimboeuf <jpoimboe@...nel.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>
CC: 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 53/56] drivers/cpu: Re-patch mitigations through sysfs
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Nikolay Borisov <nik.borisov@...e.com>
> Sent: Monday, October 27, 2025 7:25 AM
> To: Kaplan, David <David.Kaplan@....com>; Thomas Gleixner
> <tglx@...utronix.de>; Borislav Petkov <bp@...en8.de>; Peter Zijlstra
> <peterz@...radead.org>; Josh Poimboeuf <jpoimboe@...nel.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>
> Cc: Alexander Graf <graf@...zon.com>; Boris Ostrovsky
> <boris.ostrovsky@...cle.com>; linux-kernel@...r.kernel.org
> Subject: Re: [RFC PATCH 53/56] drivers/cpu: Re-patch mitigations through sysfs
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On 10/13/25 17:34, David Kaplan wrote:
> > Create a new file at /sys/devices/system/cpu/mitigations that prints the
> > current set of mitigation options and can be written to in order to
> > re-select mitigations.
> >
> > Only options related to mitigations are handled, with the file initially
> > returning the relevant options from the command line. When the file is
> > written, any existing selections are discarded and the new options are
> > evaluated.
> >
> > Signed-off-by: David Kaplan <david.kaplan@....com>
> > ---
> > .../ABI/testing/sysfs-devices-system-cpu | 8 ++
> > drivers/base/cpu.c | 113 ++++++++++++++++++
> > include/linux/cpu.h | 3 +
> > 3 files changed, 124 insertions(+)
> >
>
> <snip>
>
> > +
> > +ssize_t cpu_show_mitigation_options(struct device *dev, struct device_attribute
> *attr, char *buf);
> > +ssize_t cpu_show_mitigation_options(struct device *dev, struct device_attribute
> *attr, char *buf)
>
> Make it static
>
> > +{
> > + return sysfs_emit(buf, saved_opts);
> > +}
> > +
> > +ssize_t cpu_write_mitigation_options(struct device *dev,
> > + struct device_attribute *attr,
> > + const char *buf, size_t count);
> > +
> > +void __weak cpu_prepare_repatch_alternatives(void)
> > +{
> > +}
> > +
> > +void __weak cpu_update_alternatives(void)
> > +{
> > +}
> > +
> > +void __weak cpu_select_mitigations(void)
> > +{
> > +}
> > +
> > +ssize_t cpu_write_mitigation_options(struct device *dev,
> > + struct device_attribute *attr,
> > + const char *buf, size_t count)
> Ditto
>
> <snip>
Ack, thanks
--David Kaplan
Powered by blists - more mailing lists