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: <20070504000200.d14bd8d9.akpm@linux-foundation.org>
Date:	Fri, 4 May 2007 00:02:00 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Josef Sipek <jsipek@...sunysb.edu>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	hch@...radead.org, viro@....linux.org.uk,
	Trond.Myklebust@...app.com, mhalcrow@...ibm.com
Subject: Re: [PATCH 1/1] fs: add 4th case to do_path_lookup

On Sun, 29 Apr 2007 23:30:12 -0400 Josef Sipek <jsipek@...sunysb.edu> wrote:

> Signed-off-by: Josef 'Jeff' Sipek <jsipek@...sunysb.edu>
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index 2995fba..1516a9b 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1125,6 +1125,10 @@ static int fastcall do_path_lookup(int dfd, const char *name,
>  		nd->mnt = mntget(fs->rootmnt);
>  		nd->dentry = dget(fs->root);
>  		read_unlock(&fs->lock);
> +	} else if (flags & LOOKUP_ONE) {
> +		/* nd->mnt and nd->dentry already set, just grab references */
> +		mntget(nd->mnt);
> +		dget(nd->dentry);
>  	} else if (dfd == AT_FDCWD) {
>  		read_lock(&fs->lock);
>  		nd->mnt = mntget(fs->pwdmnt);
> diff --git a/include/linux/namei.h b/include/linux/namei.h
> index 92b422b..aa89d97 100644
> --- a/include/linux/namei.h
> +++ b/include/linux/namei.h
> @@ -48,6 +48,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
>   *  - internal "there are more path compnents" flag
>   *  - locked when lookup done with dcache_lock held
>   *  - dentry cache is untrusted; force a real lookup
> + *  - lookup path from given dentry/vfsmount pair
>   */
>  #define LOOKUP_FOLLOW		 1
>  #define LOOKUP_DIRECTORY	 2
> @@ -55,6 +56,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
>  #define LOOKUP_PARENT		16
>  #define LOOKUP_NOALT		32
>  #define LOOKUP_REVAL		64
> +#define LOOKUP_ONE	       128

Well the patch passes my too-small-to-care-about test ;)

Unless someone objects I'd suggest that you add it to the unionfs tree.
-
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