[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251103193130.GQaQkDEquEnEwb_cwC@fat_crate.local>
Date: Mon, 3 Nov 2025 20:31:30 +0100
From: Borislav Petkov <bp@...en8.de>
To: David Kaplan <david.kaplan@....com>
Cc: Thomas Gleixner <tglx@...utronix.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>, Alexander Graf <graf@...zon.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 05/56] x86/bugs: Reset spectre_v2 mitigations
On Mon, Oct 13, 2025 at 09:33:53AM -0500, David Kaplan wrote:
> Add function to reset spectre_v2 mitigations back to their boot-time
> defaults.
>
> Signed-off-by: David Kaplan <david.kaplan@....com>
> ---
> arch/x86/kernel/cpu/bugs.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index 9d5c6a3e50e1..0430635bb17d 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -2477,6 +2477,24 @@ static void __init spectre_v2_apply_mitigation(void)
> }
> }
>
> +#ifdef CONFIG_DYNAMIC_MITIGATIONS
> +static void spectre_v2_reset_mitigation(void)
Yeah, the reset should definitely be a single function - this ifdeffery around
every single one is going to become yucky.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists