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: <20080910111016.b289b3eb.akpm@linux-foundation.org>
Date:	Wed, 10 Sep 2008 11:10:16 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Michael Kerrisk <mtk.manpages@...glemail.com>
Cc:	Ulrich Drepper <drepper@...hat.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...sign.ru>,
	Roland McGrath <roland@...hat.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: paccept() oddity

On Wed, 20 Aug 2008 18:50:54 +0200 Michael Kerrisk <mtk.manpages@...glemail.com> wrote:

> Ulrich,
> 
> [
> 2.6.27-rc has paccept():
> 
> int paccept(int fd, struct sockaddr *sockaddr, socklen_t *addrlen,
>          const sigset_t *sigmask, int setsize, int flags)
> ]
> 
> While considering the sigset argument for paccept() (see my previous
> message), and testing that system call, I realized that there is a certain
> oddness in the implementation of paccept().
> 
> Like accept(), paccept() automatically restarts if interrupted by a signal
> handler that was established with the SA_RESTART flag.
> 
> On the other hand, pselect(), ppoll(), and epoll_pwait() are never restarted
> if interrupted by a handler, even if the handler was established with
> SA_RESTART.  (This is the same as with select(), poll(), and epoll_wait().)
> 
> It seems to me that it makes little sense to restart paccept(), especially in
> the case where it is interrupted by a handler for one of the signals that is
> in sigmask, since the whole point of calling paccept() is to block until a
> connection is received, or until one of the signals in sigmask is caught().
> 
> How about changing paccept() so that it is never automatically restarted if
> interrupted by a signal handler, regardless of the SA_RESTART flag.  (In
> other words, paccept() should be consistent with pselect(), ppoll(), and
> epoll_pwait(), rather than being consistent with accept().)  What are your
> thoughts?
> 

Oleg, Roland: would you have the time to ponder the above, please?

If we can't get this nailed down very soon I'd suggest that we disable
sys_paccept() for 2.6.27.  We don't want to be releasing a new system
call into 2.6.27 if there are doubts surrounding its userspace-visible
behaviour.

Thanks.
--
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