Re: [PATCH 1/3] sys_poll: Fix negative timeout values for x86 userland on x86_64 kernels v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le dimanche 18 septembre 2011 à 10:04 +0200, Thomas Meyer a écrit :
> size of int and long differs on x86 and x86_64. the ia32 emulation calls
> directly into the sys_poll function. when the timeout is set to -1
> the test for sign will fail in sys_poll as the 64bit register is tested.
> the timeout timer will be set to 0xffffffff milliseconds, but the timer
> shouldn't get set at all in this situation.
> 

As I said, you should CC stable@xxxxxxxxxx team on this patch.
All previous linux versions had this bug : A program might misbehave
because of a spurious poll(..., timeout < 0) wakeup.

Could you please refine this Changelog again ?

On 32bit user program, all negative timeout values should not set a
timout at all, not only 0xffffffff (-1)

man poll states :

The timeout argument specifies an upper limit on the time for which
poll() will block, in milliseconds.  Specifying a negative value in
timeout means an infinite timeout.



--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux