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:	Thu, 8 Jan 2009 22:39:01 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Casey Dahlin <cdahlin@...hat.com>
Cc:	Roland McGrath <roland@...hat.com>,
	Ulrich Drepper <drepper@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [RESEND][RFC PATCH v2] waitfd

On 01/08, Casey Dahlin wrote:
>
> Roland McGrath wrote:
> >>> Since waitfd shouldn't consume the child termination notification
> >>> waitfd should be more widely usable than the wait*() interfaces.
> >
> > waitid can be used that way with WNOWAIT.
>
> Yes, but waitfd does not have this flag. The reason being waitfd just
> calls waitid internally, and there is no guarantee (afaik) that calling
> waitid with WNOWAIT multiple times in succession will yield different
> results each time. This breaks the streaming behavior of the descriptor.

Yes, do_wait(WNOWAIT) will return the same result on each call. Until
the next child dies, and this child is closer to the head of ->children
list.

But the reason is not that waitfd just calls waitid() internally. Let's
suppose we add another helper (or waitfd_read() can do this by hand) so
that read(waitfd_with_WNOWAIT_flag) correctly returns the info about all
childs. Now, what should the next read() do?


Btw. It is not that I am trying to argue against sys_waitfd(), but do
you have the "real life" example when it can be useful? Yes, poll().
But we have signalfd. SIGCHLD is not rt signal, but afaics this is not
the problem actually. Just curious.

Oleg.

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