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.0706071454530.6445@alien.or.mcafeemobile.com>
Date:	Thu, 7 Jun 2007 14:57:33 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Eric Dumazet <dada1@...mosbay.com>
cc:	Kyle Moffett <mrmacman_g4@....com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Ulrich Drepper <drepper@...hat.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 Thu, 7 Jun 2007, Eric Dumazet wrote:

> Davide Libenzi a écrit :
> > On Thu, 7 Jun 2007, Eric Dumazet wrote:
> > 
> > > Davide, are you sure we want FIFO for non sequential allocations ?
> > > 
> > > This tends to use all the fmap slots, and not very cache friendly
> > > if an app does a lot of [open(),...,close()] things. We already got a perf
> > > drop because of RCUification of file freeing (FIFO mode instead of LIFO
> > > given by kmalloc()/kfree())
> > > 
> > > If the idea behind this FIFO was security (ie not easy for an app to
> > > predict next glibc file handle), we/glibc might use yet another
> > > FD_SECUREMODE flag, wich ORed with O_NONSEQFD would ask to fdmap_newfd()
> > > to take the tail of fmap->slist, not head.
> > 
> > Uli, would it be OK to rely only on base randomization and use a LIFO
> > instead? We have base randomization, plus LIFO does not mean strictly
> > sequential like legacy allocator, just more compatc and cache friendly.
> > 
> 
> I am afraid randomization wont really work if /sbin/init or /bin/bash for
> example uses one (or more) unseq fd :
> The 'random base' will be propagated at fork()/exec() time ?

As I said to Uli, we can't move the base while fds are in there. We can 
re-randomize it when it's empty. This can also be done (it's a trivial and 
fast operation - just set fmap->base to a new value) even every time the 
fd count on the map touches zero.



- Davide


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ