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: <4969230F.4080609@redhat.com>
Date:	Sat, 10 Jan 2009 17:37:03 -0500
From:	Casey Dahlin <cdahlin@...hat.com>
To:	Oleg Nesterov <oleg@...hat.com>
CC:	Scott James Remnant <scott@...onical.com>,
	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Roland McGrath <roland@...hat.com>,
	Davide Libenzi <davidel@...ilserver.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [RESEND][RFC PATCH v2] waitfd

Oleg Nesterov wrote:
> On 01/10, Casey Dahlin wrote:
>   
>> Scott James Remnant wrote:
>>     
>>> On Wed, 2009-01-07 at 18:19 +0100, Oleg Nesterov wrote:
>>>
>>>       
>>>> Please note that unlike other sys_...fd() syscalls, sys_waitfd()
>>>> doesn't allow to pass O_CLOEXEC. Looks like we need a separate
>>>> "flags" argument...
>>>>
>>>> Also, ioctl(FIONBIO) or fcntl(O_NONBLOCK) have no effect on
>>>> waitfd, not very good.
>>>>
>>>> I'd suggest to remove WNOHANG from waitfd_ctx->ops and treat
>>>> (->f_flags & O_NONBLOCK) as WNOHANG.
>>>>
>>>> (can't resist, ->ops is not the best name ;)
>>>>
>>>>
>>>>         
>>> Definitely agree here, waitfd() doesn't need WNOHANG - we already have
>>> ONONBLOCK.
>>>
>>> That also solves one of the strangest behaves of waitid when you use
>>> WNOHANG (it returns zero and you have to check whether it changed the
>>> struct), now you just read() - if no child you get EAGAIN, if a child
>>> you read a struct.
>>>
>>>       
>> From the perspective of waitfd, the only difference between WNOHANG and
>> O_NONBLOCK is which argument you put the flags in.
>>     
>
> No. Please see the note about ioctl/fcntl above.
>
> Oleg.
>   
Yes but the actual waitfd call could simply set O_NONBLOCK on the 
descriptor when it receive WNOHANG in the flags, and read the descriptor 
flags going forward.

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