[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5044f670-2706-4d92-a00e-50c5d60208d1@suse.com>
Date: Mon, 27 Oct 2025 14:25:13 +0200
From: Nikolay Borisov <nik.borisov@...e.com>
To: David Kaplan <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
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>
Powered by blists - more mailing lists
 
