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] [day] [month] [year] [list]
Date:	Thu, 9 Aug 2007 11:12:52 +0530
From:	Bharata B Rao <bharata@...ux.vnet.ibm.com>
To:	Jan Blunck <jblunck@...e.de>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC 19/26] union-mount: Make lookup work for union-mounted file systems

On Mon, Jul 30, 2007 at 06:13:42PM +0200, Jan Blunck wrote:
> On union-mounted file systems the lookup function must also visit lower layers
> of the union-stack when doing a lookup. This patches add support for
> union-mounts to cached lookups and real lookups.
> 
> We have 3 different styles of lookup functions now:
> - multiple pathname components, follow mounts, follow union, follow symlinks
> - single pathname component, doesn't follow mounts, follow union, doesn't
>   follow symlinks
> - single pathname component doesn't follow mounts, doesn't follow unions,
>   doesn't follow symlinks
> 
<snip>
> +static int hash_lookup_union(struct nameidata *nd, struct qstr *name,
> +			     struct path *path)
> +{

Jan,

Looks like there is a lot of code duplication b/n lookup_hash versions and
real_lookup versions for union mounts. Is there a reason for doing it
this way? I believe that with a little effort we should be able to get
rid of the above hash_lookup_union() completely and can instead use
real_lookup_union() variants from lookup_hash() also.

The reason I say this is, I can't see any _real_ difference b/n
real_lookup() and __lookup_hash_kern().  While the former does a seqlock
protected(for concurrent renames) dcache lookup followed by a ->lookup(),
the latter does an extra lock free dcache lookup, followed by seqlock
protected dcache lookup and a ->lookup() on failure.

Do you want me to cook up a patch for this Jan ?

Aside from that, it would help if someone could throw some light on the history
of __lookup_hash_kern. I wonder why real_lookup wasn't be used instead.

Regards,
Bharata.
-
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