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]
Message-ID: <20100615081828.GG6138@laptop>
Date:	Tue, 15 Jun 2010 18:18:28 +1000
From:	Nick Piggin <npiggin@...e.de>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	Al Viro <viro@...IV.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	John Johansen <john.johansen@...onical.com>,
	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] vfs: show unreachable paths in getcwd and proc

On Fri, Jun 04, 2010 at 01:53:42PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@...e.cz>
> 
> Prepend "(unreachable)" to path strings if the path is not reachable
> from the current root.
> 
> Two places updated are
>  - the return string from getcwd()
>  - and symlinks under /proc/$PID.
> 
> Other uses of d_path() are left unchanged (we know that some old
> software crashes if /proc/mounts is changed).
> 
> Signed-off-by: Miklos Szeredi <mszeredi@...e.cz>
> ---
>  fs/dcache.c            |   82 +++++++++++++++++++++++++++++++++++++++++--------
>  fs/proc/base.c         |    2 -
>  include/linux/dcache.h |    1 
>  3 files changed, 72 insertions(+), 13 deletions(-)
> 
> Index: linux-2.6/fs/dcache.c
> ===================================================================
> --- linux-2.6.orig/fs/dcache.c	2010-05-27 12:22:21.000000000 +0200
> +++ linux-2.6/fs/dcache.c	2010-05-27 12:22:24.000000000 +0200
> @@ -1957,6 +1957,33 @@ int __d_path(const struct path *path, st
>  	return error;
>  }
>  
> +static void current_root(struct path *root)
> +{
> +	read_lock(&current->fs->lock);
> +	*root = current->fs->root;
> +	path_get(root);
> +	read_unlock(&current->fs->lock);
> +}

Does this really need a helper? If yes, then please put matching
get_fs_{root,pwd,both} helpers into fs_struct.c and use them throughout
the 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