Linux IA64 platform development
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	"Michel Lespinasse" <walken@google.com>,
	"Émeric Maschino" <emeric.maschino@gmail.com>,
	"Patrick Baggett" <baggett.patrick@gmail.com>,
	"Jakub Jelinek" <jakub@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [regression] Re: [PATCH 2/3] futex: Sanitize cmpxchg_futex_value_locked API
Date: Mon, 05 Mar 2012 23:42:40 +0000	[thread overview]
Message-ID: <20120305234240.GB1360@burratino> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F041A65@ORSMSX104.amr.corp.intel.com>

Luck, Tony wrote:

>> It doesn't look like the return value (r8) is actually being set beyond
>> initialized to 0. If there is some ia64 instruction that modifies it, GCC
>> doesn't know about it from the inline assembly (r8 doesn't appear in the
>> inputs/outputs list). From looking at the x86 version (agh, inline asm is
>> hard to parse), it does modify the return value based on whether the
>> comparison was a success or not, and the return value is certainly used by
>> the callers.
>
> The commit comment for the change makes it sound like the return value
> is an error code (-ENOSYS if the function isn't implemented/configured;
> -EFAULT if the user address is bogus) - or zero if nothing bad happened.

Yes, that's right.

> Not "the comparison was a success or not".
>
> What's the real answer? The ia64 code is returning 0 regardless of whether the
> compare/exchange found the old value or not.  Is this a bad assumption?

No, I think something else is wrong, though I don't know what it would
be.

Émeric, was the bisection result reproducible?  E.g., if you try
building 37a9d912b24f and 37a9d912b24f^ again, does the former
consistently produce and the latter consistently not produce a crashy
system?

  reply	other threads:[~2012-03-05 23:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110307021127.GB31188@google.com>
     [not found] ` <alpine.LFD.2.00.1103082114270.2787@localhost6.localdomain6>
     [not found]   ` <20110309112550.GA3050@google.com>
     [not found]     ` <alpine.LFD.2.00.1103101948540.2787@localhost6.localdomain6>
     [not found]       ` <20110311021654.GA26122@google.com>
     [not found]         ` <20110311024851.GC26122@google.com>
2012-03-05  0:01           ` [regression] Re: [PATCH 2/3] futex: Sanitize cmpxchg_futex_value_locked API Jonathan Nieder
2012-03-05 23:21             ` Luck, Tony
2012-03-05 23:42               ` Jonathan Nieder [this message]
2012-03-08 20:59                 ` Émeric Maschino
2012-03-08 21:12                   ` Émeric Maschino
2012-04-15 21:35                     ` Émeric Maschino

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=20120305234240.GB1360@burratino \
    --to=jrnieder@gmail.com \
    --cc=baggett.patrick@gmail.com \
    --cc=emeric.maschino@gmail.com \
    --cc=jakub@redhat.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --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