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:	Sat, 9 Jun 2007 16:55:43 -0500
From:	Matt Mackall <mpm@...enic.com>
To:	Al Viro <viro@....linux.org.uk>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Kyle Moffett <mrmacman_g4@....com>,
	Ulrich Drepper <drepper@...hat.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Theodore Tso <tytso@....edu>,
	Eric Dumazet <dada1@...mosbay.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [patch 7/8] fdmap v2 - implement sys_socket2

On Sat, Jun 09, 2007 at 09:49:07PM +0100, Al Viro wrote:
> On Sat, Jun 09, 2007 at 01:21:24PM -0700, Linus Torvalds wrote:
> > Which is why you'd like to do the *initial* operation with a flag that 
> > says "please set the FD_CLOEXEC flag on the file descriptor", so that you 
> > *atomically* install the file file descriptor and set the FD_CLOEXEC bit.
> > 
> > It's trivial to do for open(), but there are about a million ways to get a 
> > file descriptor, and open() is just about the *only* one of those that 
> > actually takes a "flags" field that can be used to tell the kernel.
> 
> Eww...  Idea of pipe(2) taking flags as argument...
> 
> BTW, you also need that for recvmsg() (SCM_RIGHTS) and fsckloads of
> syscalls we've got duplicating open() for no good reason (and no, "BSD
> folks did it for sockets, so we'll do it for tons of new subsystems" doesn't
> really qualify ;-/).
> 
> I don't know if your indirect is a good idea in that respect, actually.
> AFAICS, you are suggesting per-syscall meanings of the flags, so it really
> smells like YAMultiplexor, free for abuse.

Well, of course it sucks. The question is does it suck less than
adding dozens of new syscalls to patch up problems with POSIX?

I don't think we can get this right in one iteration, so I actually
prefer Linus's approach as less likely to leave numerous vestiges of
incremental improvements around.

On the other hand, we don't want to end up in a future where the bulk
of our calls are through sys_indirect! Given the number of important
APIs that have gotten slight semantic bumps, that's a real
possibility.

-- 
Mathematics is the supreme nostalgia of our time.
-
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