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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Sep 2008 17:38:33 -0700 (PDT)
From:	Roland McGrath <roland@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Michael Kerrisk <mtk.manpages@...glemail.com>,
	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>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: paccept() oddity

I don't see any rationale for changing paccept to be an oddball special
case in its EINTR behavior.

select/poll are special cases historically, and that's why the principle of
least astonishment makes it best for pselect/ppoll to match their behavior.

The same principle makes it highly dubious to have paccept differ from
accept in such a subtlety.  I don't see any reason to want it, anyway.
An application that wants to see EINTR can just use sigaction to clear
SA_RESTART.

Frankly, I don't see the rationale for rolling the implicit sigprocmask
into paccept at all.  accept is analogous to read or other i/o calls,
not to select/poll.  It's not any normal plan to fiddle blocked signals
around a blocking i/o call.  Instead, programs use (p)select/poll (and
sometimes also O_NONBLOCK) to manage the blocking and waking up.  Then
when the program finally calls accept, it knows it won't block.  The
atomic signal machinery makes sense for pselect/ppoll to help manage the
corner cases of blocking/wakeup in event loops.  It makes no more sense
to roll blocked signal set changes into accept than it would to have
read, write, etc. all take a sigset_t and do that.


Thanks,
Roland
--
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