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]
Date:	Mon, 6 Jun 2016 16:59:02 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	Dave Hansen <dave.hansen@...el.com>,
	"Chen, Tim C" <tim.c.chen@...el.com>,
	Ingo Molnar <mingo@...hat.com>,
	Davidlohr Bueso <dbueso@...e.de>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>,
	Jason Low <jason.low2@...com>,
	Michel Lespinasse <walken@...gle.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Waiman Long <waiman.long@...com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: performance delta after VFS i_mutex=>i_rwsem conversion

On Mon, Jun 6, 2016 at 4:50 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
>
> And I do want to repeat that the patch is entirely untested. It compiles.
> I looked at the assembly it generated. It looks fine to me, but I might
> have had a brainfart and done something completely broken.

Dammit.

I did that whole dcache_emit_entry() thing because we need to do the
final target cursor move regardless, and dcache_emit_entry() will
always return with the spinlock held again.

But then I didn't actually fix the "return" to a "break".

So the "return 0" here:

> +               /* This will drop and re-take the dentry lock .. */
> +               if (!dcache_emit_entry(ctx, dentry, child))
>                         return 0;

is fatal and woudl return with the spinlock held. It *should* have
been a "break" to exit the readdir loop.

So the patch I sent out was indeed a terminal brainfart, but with that
fix to change that return to a "break" it *might* work.

            Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ