[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1811192212070.1669@nanos.tec.linutronix.de>
Date: Mon, 19 Nov 2018 22:12:44 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Jiri Kosina <jikos@...nel.org>
cc: Tim Chen <tim.c.chen@...ux.intel.com>,
Tom Lendacky <thomas.lendacky@....com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Casey Schaufler <casey.schaufler@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Jon Masters <jcm@...hat.com>,
Waiman Long <longman9394@...il.com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [Patch v5 11/16] x86/speculation: Add Spectre v2 app to app
protection modes
On Mon, 19 Nov 2018, Jiri Kosina wrote:
> On Mon, 19 Nov 2018, Thomas Gleixner wrote:
>
> > > @@ -452,12 +542,6 @@ static void __init spectre_v2_select_mitigation(void)
> > > setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW);
> > > pr_info("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n");
> > >
> > > - /* Initialize Indirect Branch Prediction Barrier if supported */
> > > - if (boot_cpu_has(X86_FEATURE_IBPB)) {
> > > - setup_force_cpu_cap(X86_FEATURE_USE_IBPB);
> > > - pr_info("Spectre v2 mitigation: Enabling Indirect Branch Prediction Barrier\n");
> > > - }
> > > -
> > > /*
> > > * Retpoline means the kernel is safe because it has no indirect
> > > * branches. Enhanced IBRS protects firmware too, so, enable restricted
> > > @@ -474,6 +558,43 @@ static void __init spectre_v2_select_mitigation(void)
> > > pr_info("Enabling Restricted Speculation for firmware calls\n");
> > > }
> > >
> > > + app2app_mode = SPECTRE_V2_APP2APP_NONE;
> > > + if (!boot_cpu_has(X86_FEATURE_IBPB) ||
> > > + !boot_cpu_has(X86_FEATURE_STIBP))
> > > + goto set_app2app_mode;
> >
> > So before that change IBPB was usable without STIBP, now not longer. What's
> > the rationale?
> >
> > This patch changes a gazillion things at once and is completely
> > unreviewable.
>
> The patchset actually ties together IBPB and STIBP pretty closely, which
> is IMO a good thing; there is no good reason why anone would want just one
> of those (or each in a different mode), at least before this magical
> coscheduling exists.
>
> But I guess this fact should be documented somewhere.
That and it can be split in pieces so it actually becomes reviewable.
Thanks,
tglx
Powered by blists - more mailing lists