[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090421.234618.181879214.davem@davemloft.net>
Date: Tue, 21 Apr 2009 23:46:18 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: greg@...kko.com
Cc: penguin-kernel@...ove.sakura.ne.jp, paul.moore@...com,
linux-security-module@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] LSM: Add security_socket_post_accept() and
security_socket_post_recv_datagram().
From: Greg Lindahl <greg@...kko.com>
Date: Tue, 21 Apr 2009 23:41:59 -0700
> On Tue, Apr 21, 2009 at 11:34:03PM -0700, David Miller wrote:
>
>> People use poll() to avoid -EAGAIN and blocking, they expect the bits
>> to tell them what fd's they can work on to do real work.
>
> My point is that EAGAIN happens already. So you can't claim that
> returning it in accept() breaks the interface, when it's common enough
> that today's user-level network code already handles it.
EAGAIN does not happen if the application calls poll(), gets
an indication that connections are available, and then
immediately calls accept() on the indicated FD.
It can only happen if it calls accept() multiple times after such a
poll() call _OR_ it does not control multi-threaded access to the
listen file descriptor.
This new behavior from TOMOYO would make accept() return -EAGAIN in
cases which are of no fault of the application. It is definitely
unexpected behavior.
If overly anal apps "code for it" that is entirely besides the point.
What we have to be concerned for, from a kernel behavioral standpoint,
is that some apps "might not code for it". This is why we don't
change behavior.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists