From: Eric Dumazet <eric.dumazet@gmail.com>
To: Thomas Meyer <thomas@m3y3r.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org
Subject: Re: [PATCH 1/3] sys_poll: Fix negative timeout values for x86 userland on x86_64 kernels v2
Date: Sun, 18 Sep 2011 10:58:26 +0200 [thread overview]
Message-ID: <1316336306.31335.8.camel@edumazet-laptop> (raw)
In-Reply-To: <1316333042.5814.23.camel@localhost.localdomain>
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@kernel.org 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.
next prev parent reply other threads:[~2011-09-18 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-18 8:04 [PATCH 1/3] sys_poll: Fix negative timeout values for x86 userland on x86_64 kernels v2 Thomas Meyer
2011-09-18 8:04 ` Thomas Meyer
2011-09-18 8:47 ` Geert Uytterhoeven
2011-09-18 8:58 ` Eric Dumazet [this message]
2011-09-18 8:58 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316336306.31335.8.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas@m3y3r.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox