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: <20070603064322.GA12576@elte.hu>
Date:	Sun, 3 Jun 2007 08:43:22 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Davide Libenzi <davidel@...ilserver.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ulrich Drepper <drepper@...hat.com>
Subject: Re: [patch 2/2] ufd v1 - use unsequential O(1) fdmap


* Davide Libenzi <davidel@...ilserver.org> wrote:

> This patch plugs the extended fdmap into the kernel. At the moment, this
> is done only through sys_dup2() and F_DUPFD.
> The base value for the unsequential file descriptor allocation is (at the
> moment) set to FD_UNSEQ_BASE (defined in asm-generic/fcntl.h):

really nice stuff! :-)

> #define FD_UNSEQ_BASE	(1U << 28)
> #define FD_UNSEQ_ALLOC  (1U << 30)

i'm wondering, why not use (1 << 30) both as the base and as the flag? 
That would make integration of the new fd space 'seemless' in terms of 
dup2() use.

> It'd be possible to add a new O_UNSEQFD flag to open(2) and make 
> sys_open() to allocate the new descriptor inside the unsequential map.

yeah, please do that now - lets not leave any incomplete areas. We've 
too often made the mistake of not pushing through new APIs consistently 
enough.

I'd also suggest a new sys_socket2() call that takes a 'flags' parameter 
as well - because one primary user of this facility will be networking 
servers. (O_UNSEQFD would make sense for it and O_NDELAY - currently 
network apps that want to set O_NDELAY need to do it with an extra 
fcntl() - while they could already indicate this in the sys_socket() 
call, if it were closer to sys_open() semantics)

in any case, your patch is looking really good and already deserves an 
ack!

Acked-by: Ingo Molnar <mingo@...e.hu>

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