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:	Sun, 17 May 2015 13:12:03 +1000
From:	NeilBrown <neilb@...e.de>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andreas Dilger <adilger@...ger.ca>,
	Dave Chinner <david@...morbit.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [RFC][PATCHSET v3] non-recursive pathname resolution & RCU
 symlinks

On Sat, 16 May 2015 15:18:11 +0100 Al Viro <viro@...IV.linux.org.uk> wrote:

> On Sat, May 16, 2015 at 06:46:26AM +0100, Al Viro wrote:
> 
> > Dealing with multi-component lookups isn't impossible and might be a good
> > idea, but only if all intermediates are populated.  What information does
> > NFSv4 multi-component lookup give you?  9p one gives an array of FIDs,
> > one per component, and that is best used as multi-component revalidate
> > on hot dcache...
> 
> 	Having reread the RFC...  What's the problem with intermediates?
> Just put GETFH and GETATTR between the LOOKUP for each component in
> the same compound and be done with that - you've got yourself everything
> you might possibly need for populating them.  Confused...

The problem isn't getting intermediates.  The problem is that not having
intermediates confuses the dcache.  When the dcache is just providing a
caching service, and not providing a consistency service, then it shouldn't
let itself get confused.

> 
> 	BTW, I would still very much prefer to allocate a chain of
> dentries in fs/namei.c (yes, marking them "in-lookup"), then gave an
> array of pointers (or beginning and end of the chain, but that can
> be more delicate due to dentry tree topology changes from e.g.
> d_materialize_unique(), aka d_splice_alias() these days).  With
> the requirement being "populate them in root-to-leaves order, do nothing
> for ones that had in-lookup flag already cleared".
> 
> 	Another fun possibility (but that would take somewhat more
> restructuring in fs/namei.c) would be to have (on hot cache) a path
> traced for several components, seeing that they are all on the same
> fs and delaying revalidation for a while.  With bulk revalidate covering
> all the chain when we stumble across .., mountpoint or something we believe
> to be a symlink, or when the chain reaches fs-specified limit.  Said bulk
> revalidate should tell how long a prefix had been OK.  Permission change
> handling would be the painful part here...

This seems to just entrench the approach that the dcache is in control and
you are trying to contort it in some unnecessary way to meet one more need.

In the common case, the rcu_walk version of d_revalidate would be very simple
and batching them isn't going to buy much.  Once you hit a "needs revalidate"
or anything else that trips up rcu_walk, just hand it all to the filesystem
and say "your problem".  If the filesystem wants to continue one step at a
time, that is easy - there are helpers for that.   If the filesystem wants to
send the remainder of the path to the server, it can do that too (being
careful of symlinks and mount points of course).  Just give the filesystem
control for the rare slow path.

NeilBrown

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ