From: Richard Henderson <rth@twiddle.net>
To: Michael Cree <mcree@orcon.net.nz>
Cc: Michel Lespinasse <walken@google.com>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
Matt Turner <mattst88@gmail.com>
Subject: Re: alpha: futex regression bisected
Date: Mon, 20 Feb 2012 09:28:42 -0800 [thread overview]
Message-ID: <4F4282CA.5010502@twiddle.net> (raw)
In-Reply-To: <4F420256.2090600@orcon.net.nz>
On 02/20/12 00:20, Michael Cree wrote:
> I have noticed some user space problems (pulseaudio crashes in pthread
> code, glibc/nptl test suite failures, java compiler freezes on SMP alpha
> systems) that arise when using a 2.6.39 or later kernel on Alpha.
> Bisecting between 2.6.38 and 2.6.39 (using glibc/nptl test suite as
> criterion for good/bad kernel) eventually leads to:
>
> 8d7718aa082aaf30a0b4989e1f04858952f941bc is the first bad commit
> commit 8d7718aa082aaf30a0b4989e1f04858952f941bc
> Author: Michel Lespinasse <walken@google.com>
> Date: Thu Mar 10 18:50:58 2011 -0800
>
> futex: Sanitize futex ops argument types
>
> Change futex_atomic_op_inuser and futex_atomic_cmpxchg_inatomic
> prototypes to use u32 types for the futex as this is the data type the
> futex core code uses all over the place.
futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
u32 oldval, u32 newval)
...
: "r"(uaddr), "r"((long)oldval), "r"(newval)
There is no 32-bit compare instruction. These are implemented by
consistently extending the values to a 64-bit type. Since the
load instruction sign-extends, we want to sign-extend the other
quantity as well (despite the fact it's logically unsigned).
So:
- : "r"(uaddr), "r"((long)oldval), "r"(newval)
+ : "r"(uaddr), "r"((long)(int)oldval), "r"(newval)
should do the trick.
r~
next prev parent reply other threads:[~2012-02-20 17:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 8:20 alpha: futex regression bisected Michael Cree
2012-02-20 17:28 ` Richard Henderson [this message]
2012-02-27 6:48 ` Michael Cree
2012-03-02 22:36 ` Andrew Morton
2012-03-02 23:40 ` Michael Cree
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=4F4282CA.5010502@twiddle.net \
--to=rth@twiddle.net \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=mcree@orcon.net.nz \
--cc=walken@google.com \
/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