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.LFD.2.00.0904171010470.4042@localhost.localdomain>
Date:	Fri, 17 Apr 2009 10:21:06 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
cc:	Ingo Molnar <mingo@...e.hu>, Al Viro <viro@...IV.linux.org.uk>,
	Alessio Igor Bogani <abogani@...ware.it>,
	Alexander Viro <viro@....linux.org.uk>,
	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH -tip] remove the BKL: Replace BKL in mount/umount syscalls
 with a mutex



On Fri, 17 Apr 2009, Peter Zijlstra wrote:
> 
> Anyway, it seems quite clear that the first thing is to push the current
> BKL usage down into the filesystems -- which should be somewhat
> straight-forward.

Yes, if somebody sends the obvious mechanical patch, we can apply that 
easily. Then, most common filesystems can probably remove the BKL 
trivially by maintainers that know that they don't do anything at all with 
it.

Of course, right now we do hold the BKL over _multiple_ downcalls, so in 
that sense it's not actually totally 100% correct and straightforward to 
just move it down. Eg in the generic_shutdown_super() case we do

	lock_kernel();
	  ->write_super();
	  ->put_super();
	invalidate_inodes();
	unlock_kernel();

and obviously if we split it up so that we push a lock_kernel() into both, 
we end up unlocking in between. I doubt anything cares, but it's still a 
technical difference.

There are similar issues with 'remount' holding the BKL over longer 
sequences.

Btw, the superblock code really does seem to depend on lock_kernel. Those 
"sb->s_flags" accesses are literally not protected by anything else afaik.

That said, I think that fs/locks.c is likely a much bigger issue. Very few 
people care about any realtimeness of mount/unmount/remount. But file 
locking? That is much more likely to be an issue.

And I know we had patches for file locking BKL-removal at some point. What 
happened to them? Were they just broken, or forgotten, or waiting in Jon's 
tree, or what?

		Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ