public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Andi Kleen <ak@suse.de>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Chuck Ebbert <76306.1226@compuserve.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch] i386: make bitops safe
Date: Mon, 27 Feb 2006 16:54:36 -0800	[thread overview]
Message-ID: <20060228005436.GA24895@redhat.com> (raw)
In-Reply-To: <200602280047.22909.ak@suse.de>

On Tue, Feb 28, 2006 at 12:47:22AM +0100, Andi Kleen wrote:
> I remember asking rth about this at some point and IIRC
> he expressed doubts if it would actually do what expected. Richard?

It's a bit dicey to be sure.  GCC may or may not be able to look
through the size of the array and not kill things beyond it.  If
one could be *sure* of some actual maximum index, this would be
fine, but I don't think you can.

One could reasonably argue that if you used a structure with a
flexible array member, that GCC could not look through that.  But
again I'm not 100% positive this is handled properly.

I think the best argument for simply leaving things with a memory
clobber is that these are atomic operations, and are on occasion
used as locks, or parts of locks.


r~

  reply	other threads:[~2006-02-28  0:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 21:57 [patch] i386: make bitops safe Chuck Ebbert
2006-02-27 23:06 ` Linus Torvalds
2006-02-27 23:47   ` Andi Kleen
2006-02-28  0:54     ` Richard Henderson [this message]
2006-02-28  1:24       ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2006-02-28  6:04 Chuck Ebbert
2006-02-28 21:25 ` Richard Henderson

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=20060228005436.GA24895@redhat.com \
    --to=rth@redhat.com \
    --cc=76306.1226@compuserve.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.org \
    /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