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>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0703052325310.4907@alien.or.mcafeemobile.com>
Date:	Mon, 5 Mar 2007 23:27:45 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Avi Kivity <avi@...o.co.il>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch] epoll use a single inode ...

On Tue, 6 Mar 2007, Avi Kivity wrote:

> >  /* File callbacks that implement the eventpoll file behaviour */
> >  static const struct file_operations eventpoll_fops = {
> >  	.release	= ep_eventpoll_close,
> > @@ -763,15 +767,18 @@
> >  	 * using the inode number.
> >  	 */
> >  	error = -ENOMEM;
> > -	sprintf(name, "[%lu]", inode->i_ino);
> > +	sprintf(name, "[%p]", ep);
> >  	this.name = name;
> >  	this.len = strlen(name);
> > -	this.hash = inode->i_ino;
> > +	this.hash = 0;
> >  	dentry = d_alloc(eventpoll_mnt->mnt_sb->s_root, &this);
> >  	if (!dentry)
> >  		goto eexit_4;
> >  	dentry->d_op = &eventpollfs_dentry_operations;
> > -	d_add(dentry, inode);
> > +	/* Do not publish this dentry inside the global dentry hash table */
> > +	dentry->d_flags &= ~DCACHE_UNHASHED;
> > +	d_instantiate(dentry, inode);
> > +
> >   
> 
> I've used d_alloc_anon() in similar code in kvmfs.  You lose the ep 
> pointer in the name, but as a kernel address it isn't particularly 
> useful to userspace.

That ends up calling two times the find alias for an unhashed dentry, no?
And this linearly scans the inode's dentry list, no?



- Davide


-
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