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:	Tue, 31 Jul 2007 22:31:41 +0200
From:	Manfred Spraul <manfred@...orfullife.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-kernel@...r.kernel.org, Oleg Nesterov <oleg@...sign.ru>,
	Roland McGrath <roland@...hat.com>
Subject: Re: [PATCH] Use ERESTARTNOHAND if poll() is interrupted by a signal

Andrew Morton wrote:
> On Sun, 29 Jul 2007 19:05:05 +0200
> Manfred Spraul <manfred@...orfullife.com> wrote:
>
>   
>> Hi Andrew,
>>
>> poll() returns -EINTR if a signal is pending.
>> EINTR is a bad choice: it means that poll returns to user space if the
>> task is stopped by SIGSTOP/SIGCONT or by the freezer.
>> select() and ppoll() both use ERESTARTNOHAND, this avoids a return to
>> user space for signals that are handled by the kernel.
>>
>> The patch switches poll() to ERESTARTNOHAND.
>> Tested with FC6. Patch against 2.6.23-rc1-mm1.
>>     
>
> hm.  Is this a fix against
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc1/2.6.23-rc1-mm1/broken-out/do_poll-return-eintr-when-signalled.patch
> only, or does mainline also need fixing?
>
>   
Mainline has the same problem: poll() returns to user space if it's 
interrupted by SIGSTOP/SIGCONT.
> I guess the consequences of the thing-which-this-fixes aren't huge, s I ca
> queue this up for 2.6.24, after Oleg's
> do_poll-return-eintr-when-signalled.patch?
>
>   
Yes, please queue it: most/all linux versions show this behavior. 
Additionally, poll() is usually called in a loop and a spurious wakeup 
has no consequences.

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