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.1811281142290.1875@nanos.tec.linutronix.de>
Date:   Wed, 28 Nov 2018 11:43:26 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Tim Chen <tim.c.chen@...ux.intel.com>
cc:     Jiri Kosina <jikos@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        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>,
        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 20/24] x86/speculation: Split out TIF update

On Tue, 27 Nov 2018, Tim Chen wrote:
> On 11/27/2018 02:36 PM, Thomas Gleixner wrote:
> >> We need this special handling only if the next task has TIF_SPEC_UPDATE 
> >> set, which is one-off event globally (when seccomp marks all its threads 
> >> so due to seccomp filter change), and once all the TIF_SPEC_UPDATE tasks 
> >> schedule at least once, we're in a consistent state again and don't need 
> >> this, as every running task will then have its TIF consistent with MSR 
> >> value.
> > 
> > And how so? You set the bits is spec_flags. And then you set the TIF_UPDATE
> > bit which is evaluated once.
> > 
> > Then you OR the bits into tifp which is a local variable and has nothing to
> > do with the TIF flags of the next task. So on the next context switch this
> > will evaluate the previous state of the TIF bits and you could have spared
> > the whole exercise :)
> > 
> 
> This is better than my original implementation which was racy.
> Using task_spec_ssb_disable and task_spec_ib_disable to update TIF_* flags
> at context switch time makes the update logic very clear
> and extensible.

Clear yes. Extensible - hopefully not. This needs to end.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ