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:	Wed, 07 Mar 2007 12:30:47 -0800
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Davide Libenzi <davidel@...ilserver.org>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch 1/4] signalfd v1 - signalfd core ...

Davide Libenzi wrote:
> On Wed, 7 Mar 2007, Linus Torvalds wrote:
>
>   
>> On Wed, 7 Mar 2007, Stephen Rothwell wrote:
>>     
>>> You probably need the queue anyway because the real time signals are
>>> supposed to queue.
>>>       
>> Davide - the *real* problem is (I think) that you try to allow signals to 
>> be returned *both* by signalfd() and as a real signal.
>>
>> That's wrong, wrong, wrong.
>>
>> My original patch used "dequeue_signal()" to dequeue signals. Trust me, I 
>> did that for a reason. Your re-design to think that you can get the signal 
>> without using the real signal dequeueing is simply broken.
>>     
>
> I think having the ability to have both can be usefull, so the idea of 
> having multiple listeners fd (that both would not work with the single 
> queue since they'd racing over dequeue_signal).
>   

Do you have a specific use-case in mind?  Because I don't think this is
very useful at all; in fact it may be the opposite of useful.

Generally signals are "owned" by one particular piece of code, and if
you want to distribute the event further then you do that in the app, as
you have to do with a normal signal handler.  This code is the fd-based
analog of sigtimedwait, and so it should behave basically the same way. 
If multiple threads call sigtimedwait on the same signal set, then one
and only one will receive each signal.  This is good, because it means
you can have a thread pool processing signals (and other events) knowing
that there won't be duplicate processing.

I haven't looked at your code in detail, but it isn't clear from your
description whether you can have multiple signalfds for different
(distinct) sets of signals.  That would be useful as a first level of
demultiplexing between multiple user-mode signal consumers.  If you
allow that, you need to decide whether a read/poll on a signalfd blocks
until the head queued signal is part of the signal set, or if any queued
signal is in the set.

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