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]
Date:	Mon, 5 Mar 2007 22:31:11 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Eric Dumazet <dada1@...mosbay.com>
cc:	"H. Peter Anvin" <hpa@...or.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch v2] epoll use a single inode ...

On Tue, 6 Mar 2007, Eric Dumazet wrote:

> Davide Libenzi a écrit :
> > On Mon, 5 Mar 2007, H. Peter Anvin wrote:
> > 
> > > Davide Libenzi wrote:
> > > > Right now is using:
> > > > 
> > > > 	this.len = sprintf(name, "[%u.%d]", current->pid, fd);
> > > > 
> > > > That should be unique and not have the wraparound problem. Ack?
> > > > 
> > > NAK, very much NAK.
> > > 
> > > File descriptors aren't file structures, they're *pointers* to file
> > > structures.
> > > 
> > > It's perfectly possible -- downright common -- for a file descriptor to be
> > > inherited by another process, and then the pid is recycled -- collision.
> > 
> > Ugh! Right! 64 bit counter it is ... :)
> 
> For epoll, I suspect this is harmless : Programs dont allocate epolls fd every
> milli second, but at startup only.
> 
> For pipes/sockets, using a 64 bits would be problematic, because sprintf()
> uses a divide for each digit. And a divide is slow. Ten divides are *very*
> slow.

This would be used for epoll, signalfd and timerfd. And the printf format 
is %llu ;)



- Davide


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ