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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 17 Oct 2018 17:47:07 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     David Laight <David.Laight@...LAB.COM>,
        'Sebastian Andrzej Siewior' <bigeasy@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH 1/3] x86/mm/pat: Disable preemption around
 __flush_tlb_all()

On Wed, Oct 17, 2018 at 01:17:18PM +0200, Thomas Gleixner wrote:
> On Wed, 17 Oct 2018, Peter Zijlstra wrote:
> > On Wed, Oct 17, 2018 at 09:54:38AM +0000, David Laight wrote:
> > > >  	 * We should perform an IPI and flush all tlbs,
> > > >  	 * but that can deadlock->flush only current cpu:
> > > >  	 */
> > > > +	preempt_disable();
> > > >  	__flush_tlb_all();
> > > > +	preempt_enable();
> > > 
> > > Can it make any sense to flush the tlb with preemption enabled?
> > > Surely preemption must be disabled over something else as well?
> > 
> > This code is fishy anyway, for only doing that local invalidate.
> > 
> > Ideally we'd never ever merge anything that only does local invalidates,
> > on a global address space, that's just broken.
> 
> A little bit late to lament about that.

For this, yes :/ But for future stuff we should really not allow such
things anymore.

> So should we just replace it with cpa_flush_all() ?

The comment there suggests that will deadlock, supposedly because the
kernel_map_page() call can happen with IRQs disabled or such.

I've not deeply looked at this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ