[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4747E0C6.5010900@cosmosbay.com>
Date: Sat, 24 Nov 2007 09:28:54 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Ulrich Drepper <drepper@...hat.com>
CC: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
mingo@...e.hu, tglx@...utronix.de, torvalds@...ux-foundation.org
Subject: Re: [PATCHv5 4/5] Allow setting O_NONBLOCK flag for new sockets
Ulrich Drepper a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Eric Dumazet wrote:
>> 1) Can the fd passing with recvmsg() on AF_UNIX also gets O_CLOEXEC
>> support ?
>
> Already there, see MSG_CMSG_CLOEXEC.
OK, but maybe for consistency, we might accept the two mechanisms.
The one added in 2.6.23, and the more general indirect() way.
(See attached untested patch for the general idea, you'll have to also add
#if INDSYSCALL(recvmsg)
case INDSYSCALL(recvmsg):
#endif
)
>> 2) Why this O_NONBLOCK ability is needed for sockets ? Is it a security
>> issue, and if yes could you remind it to me ?
>
> No security issue. But look at any correct network program, all need to
> set the mode to non-blocking. Adding this support to the syscall comes
> at almost no cost and it cuts the cost for every program down by one or
> two syscalls.
>
OK, thank you.
View attachment "scm.patch" of type "text/plain" (531 bytes)
Powered by blists - more mailing lists