lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1811230012530.1665@nanos.tec.linutronix.de>
Date:   Fri, 23 Nov 2018 00:17:32 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Ingo Molnar <mingo@...nel.org>
cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Jiri Kosina <jkosina@...e.cz>,
        Tom Lendacky <thomas.lendacky@....com>,
        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>,
        Greg KH <gregkh@...uxfoundation.org>,
        Dave Stewart <david.c.stewart@...el.com>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [patch 21/24] x86/speculation: Prepare arch_smt_update() for
 PRCTL mode

On Thu, 22 Nov 2018, Ingo Molnar wrote:
> * Thomas Gleixner <tglx@...utronix.de> wrote:
> > +static void update_stibp_msr(void *info)
> >  {
> > -	/* Enhanced IBRS makes using STIBP unnecessary. */
> > -	if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED)
> > -		return false;
> > -
> > -	/* Check for strict app2app mitigation mode */
> > -	return spectre_v2_app2app == SPECTRE_V2_APP2APP_STRICT;
> > +	wrmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
> >  }
> 
> 
> Does Sparse or other tooling warn about unused function parameters? If 
> yes then it might make sense to mark it __used?

That would be __useless :)

> So I'm wondering, shouldn't firmware_restrict_branch_speculation_start()/_end()
> also enable/disable STIBP? It already enabled/disables IBRS.

IBRS includes STIBP. We don't use IBRS in the kernel otherwise because
you'd have to do more MSR writes on the protection boundaries.

We only use ENHANCED IBRS if it's available, which also makes STIBP
redundant.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ