Thread (63 messages) 63 messages, 12 authors, 2019-09-18

Re: [PATCH v12 10/12] namei: aggressively check for nd->root escape on ".." resolution

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2019-09-04 23:45:19
Also in: linux-alpha, linux-api, linux-arch, linux-fsdevel, linux-kselftest, linux-mips, linux-s390, linux-sh, linuxppc-dev, lkml, sparclinux

On Wed, Sep 4, 2019 at 4:29 PM Al Viro [off-list ref] wrote:
On Wed, Sep 04, 2019 at 03:38:20PM -0700, Linus Torvalds wrote:
quoted
On Wed, Sep 4, 2019 at 3:31 PM David Howells [off-list ref] wrote:
quoted
It ought to be reasonably easy to make them per-sb at least, I think.  We
don't allow cross-super rename, right?
Right now the sequence count handling very much depends on it being a
global entity on the reader side, at least.

And while the rename sequence count could (and probably should) be
per-sb, the same is very much not true of the mount one.
Huh?  That will cost us having to have a per-superblock dentry
hash table; recall that lockless lockup can give false negatives
if something gets moved from chain to chain, and rename_lock is
first and foremost used to catch those and retry.  If we split
it on per-superblock basis, we can't have dentries from different
superblocks in the same chain anymore...
That's exactly the "very much depends on it being a global entity on
the reader side" thing.

I'm not convinced that's the _only_ way to handle things. Maybe a
combination of (wild handwaving) per-hashqueue sequence count and some
clever scheme for pathname handling could work.

I've not personally seen a load where the global rename lock has been
a problem (very few things really do a lot of renames), but
system-wide locks do make me nervous.

We have other (and worse) ones. tasklist_lock comes to mind.

             Linus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help