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: <E1Jc1ai-0003rc-RY@pomaz-ex.szeredi.hu>
Date:	Wed, 19 Mar 2008 17:56:40 +0100
From:	Miklos Szeredi <miklos@...redi.hu>
To:	viro@...IV.linux.org.uk
CC:	miklos@...redi.hu, akpm@...ux-foundation.org, linuxram@...ibm.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 5/6] vfs: optimization to /proc/<pid>/mountinfo patch

> On Thu, Mar 13, 2008 at 10:26:46PM +0100, Miklos Szeredi wrote:
> > +static int prepend(char **buffer, int *buflen, const char *str,
> > +			  int namelen)
> 
> inline, please.

Akpm wrote earlier about this function:
| Both the newly-added inlines in this patch are wrong.  They will result in
| a larger and slower kernel.  This should be very well known by now.

Please fight that out with him :)

> > @@ -1911,10 +1902,9 @@ char *dentry_path(struct dentry *dentry,
> >  
> >  	spin_lock(&dcache_lock);
> >  	prepend(&end, &buflen, "\0", 1);
> > -	if (!IS_ROOT(dentry) && d_unhashed(dentry)) {
> > -		if (prepend(&end, &buflen, "//deleted", 9))
> > +	if (!IS_ROOT(dentry) && d_unhashed(dentry) &&
> > +		(prepend(&end, &buflen, " (deleted)", 10) != 0))
> >  			goto Elong;
> 
> That's a bad idea:
> 	* we bloody well might want to use it outside of procfs
> 	* //deleted is _better_; you can't have an empty path component,
> but you can have a pathname ending on " (deleted)".

This was again Andrew's comment (making it look the same as the links
in /proc/PID/fd), but here I have to agree that //deleted is probably
better in this case.

Miklos
--
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