[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250211190307.g36lotfyi6dmc3cx@jpoimboe>
Date: Tue, 11 Feb 2025 11:03:07 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: David Kaplan <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>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 30/35] x86/bugs: Add attack vector controls for
spectre_v2_user
On Wed, Jan 08, 2025 at 02:25:10PM -0600, David Kaplan wrote:
> @@ -1614,6 +1614,13 @@ spectre_v2_user_select_mitigation(void)
> spectre_v2_user_stibp = SPECTRE_V2_USER_STRICT;
> break;
> case SPECTRE_V2_USER_CMD_AUTO:
> + if (should_mitigate_vuln(X86_BUG_SPECTRE_V2_USER)) {
> + spectre_v2_user_ibpb = SPECTRE_V2_USER_PRCTL;
> + spectre_v2_user_stibp = SPECTRE_V2_USER_PRCTL;
> + } else {
> + return;
> + }
> + break;
Can just fallthrough in the should_mitigate_vuln() case?
> case SPECTRE_V2_USER_CMD_PRCTL:
> spectre_v2_user_ibpb = SPECTRE_V2_USER_PRCTL;
> spectre_v2_user_stibp = SPECTRE_V2_USER_PRCTL;
--
Josh
Powered by blists - more mailing lists