[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1810181451460.1647@nanos.tec.linutronix.de>
Date: Thu, 18 Oct 2018 14:58:56 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Tim Chen <tim.c.chen@...ux.intel.com>
cc: Jiri Kosina <jikos@...nel.org>,
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>, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: Re: [Patch v3 04/13] x86/speculation: Disable STIBP when enhanced
IBRS is in use
On Wed, 17 Oct 2018, Tim Chen wrote:
> With enhanced IBRS in use, the application running on sibling CPU will not
on a hyperthread sibling
> be able to launch Spectre v2 attack to the application on current CPU.
That's technically wrong. It still can launch an attack, but the attack
wont work.
So this wants to be:
will not be able to exploit the Spectre V2 vulnerability.
> @@ -881,7 +889,9 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr
> ", IBPB" : "",
> boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ?
> ", IBRS_FW" : "",
> - (x86_spec_ctrl_base & SPEC_CTRL_STIBP) ?
> + spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED ?
> + ", Enhanced IBRS" :
> + (x86_spec_ctrl_base & SPEC_CTRL_STIBP) ?
> ", STIBP" : "",
This is more than horrible, really. Can you please do the following:
1) Split the sprintf() into a helper function in a first patch, which
spares a ibdentation level. i.e. what you tried in 2/13
2) If that condition still needs ugly unreadable line breaks, then split it
out into a helper function as well.
Thanks,
tglx
Powered by blists - more mailing lists