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: <Pine.LNX.4.64.0706081448330.5795@alien.or.mcafeemobile.com>
Date:	Fri, 8 Jun 2007 14:59:10 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
cc:	Ulrich Drepper <drepper@...hat.com>, Theodore Tso <tytso@....edu>,
	Eric Dumazet <dada1@...mosbay.com>,
	Kyle Moffett <mrmacman_g4@....com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [patch 7/8] fdmap v2 - implement sys_socket2

On Fri, 8 Jun 2007, Alan Cox wrote:

> > > #1: Throw the whole thing away and accept its not a good idea anyway
> > 
> > Unfortunately (exactly because of the same guarantees you're asking for 
> > those handles), in order for userspace libraries to reliably internally 
> > use fds to interact with the kernel, you need another kind of allocation 
> > strategy.
> 
> Unproven and dubious at best as a claim.

I really don't mean to be rude and pointing you to read the archives, but 
the proof and the reason why claims are valid is inside there.



> > > #2: If I was really going this way and I wanted to use it for serious
> > > tricks for high performance I/O then I'd provide the handle from
> > > userspace so that the strategy for allocation is controlled by the caller
> > > who is the only one who can make the smart decisions
> > 
> > It does not work. What if the main application, library A and library B 
> > wants to implement their own allocation strategy?
> 
> Its called "discipline". I would suggest that libc contains a default
> allocator. You might also want to assign library and application ranges
> for clarity.

That is really nice solution. Each library has to have each own allocator. 
Then we'll have what, a committee that assigns fd ranges?
Ranges cannot be implemented with the current fdtable allocator, because 
they'll be way far apart and they'll waste space. Multiple separate ranges 
will require multiple fdtable structures (one for each range/allocator). 
Instead of a two-way switch (legacy and non-sequential) you will have 
multiple choices to select. This multiple choices will have to be 
replicated all around the code that access directly the fdtables. I did 
the fdmap consolidation patch, and I can tell you there are quite a few 
places that access fdtables directly.




- 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