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: <20181106082019.GF22431@hirez.programming.kicks-ass.net>
Date:   Tue, 6 Nov 2018 09:20:19 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Nadav Amit <namit@...are.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Dave Hansen <dave.hansen@...el.com>,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v3 6/7] x86/alternatives: use temporary mm for text poking

On Mon, Nov 05, 2018 at 06:04:42PM +0000, Nadav Amit wrote:
> From: Peter Zijlstra
> Sent: November 5, 2018 at 1:30:41 PM GMT
> > To: Nadav Amit <namit@...are.com>
> > Cc: Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org, x86@...nel.org, H. Peter Anvin <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, Andy Lutomirski <luto@...nel.org>, Kees Cook <keescook@...omium.org>, Dave Hansen <dave.hansen@...el.com>, Masami Hiramatsu <mhiramat@...nel.org>
> > Subject: Re: [PATCH v3 6/7] x86/alternatives: use temporary mm for text poking
> > 
> > 
> > On Fri, Nov 02, 2018 at 04:29:45PM -0700, Nadav Amit wrote:
> >> +	unuse_temporary_mm(prev);
> >> +
> >> +	pte_unmap_unlock(ptep, ptl);
> > 
> > That; that does kunmap_atomic() on 32bit.
> > 
> > I've been thinking that the whole kmap_atomic thing on x86_32 is
> > terminally broken, and with that most of x86_32 is.
> > 
> > kmap_atomic does the per-cpu fixmap pte fun-and-games we're here saying
> > is broken. Yes, only the one CPU will (explicitly) use those fixmap PTEs
> > and thus the local invalidate _should_ work. However nothing prohibits
> > speculation on another CPU from using our fixmap addresses. Which can
> > lead to the remote CPU populating its TLBs for our fixmap entry.
> > 
> > And, as we've found, there are AMD parts that #MC when there are
> > mis-matched TLB entries.
> > 
> > So what do we do? mark x86_32 SMP broken?
> 
> pte_unmap() seems to only use kunmap_atomic() when CONFIG_HIGHPTE is set, no?
> 
> Do most distributions run with CONFIG_HIGHPTE?

Sure; but all of x86_32 relies on kmap_atomic. This was just the the one
way I ran into it again.

By our current way of thinking, kmap_atomic simply is not correct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ