public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: akpm@linux-foundation.org, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, mark.langsdorf@amd.com,
	arekm@maven.pl, "H. Peter Anvin" <hpa@zytor.com>,
	Andi Kleen <andi@firstfloor.org>, Avi Kivity <avi@qumranet.com>
Subject: Re: [patch 2/2] x86 amd fix cmpxchg read acquire barrier
Date: Wed, 22 Apr 2009 18:47:49 -0400	[thread overview]
Message-ID: <20090422224749.GA22718@Krystal> (raw)
In-Reply-To: <20090422215913.67c1298e@lxorguk.ukuu.org.uk>

* Alan Cox (alan@lxorguk.ukuu.org.uk) wrote:
> > There is no official AMD bug ID yet, but it seems to be reported in the field
> > and a fix is present in Solaris code base. The following links shows the current
> > understanding of the issue.
> 
> I would like to know why there isn't an official vendor Bug ID yet
> because without that nobody knows what the fix actually is or when it is
> needed.

I guess AMD should answer to this.

> It's also not going to help much given the user space problem
> (and mixed kernel/user stuff like futexes).

Yeah, ideally, unless user-space is completely audited, the kernel
should restrict multi-threaded user-space programs to run on a single
CPU unless they don't share any memory mapping when the kernel finds it
is running on such broken CPU. Or it can simply refuse to bring up more
than one CPU. That would be a very basic gross fix for a gross problem,
but at least there would be no data corruption. If we use this last
solution, then my cmpxchg lfence workaround becomes unneeded.

> Second point - it needs to be possible to avoid compiling this stuff in
> the first place. I don't see where you arrange CMPXCHNG_LFENCE to come
> out as blank when people compile for processors without the bug ?
> 

Good point. I should probably configure this as "nothing" unless

#ifdef CONFIG_X86_64
#if (defined(CONFIG_GENERIC_CPU) || defined(CONFIG_MK8))
...
#endif
#endif

I doubt it's worth adding a "HAVE_MISSING_CMPXCHG_LFENCE" select.

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2009-04-22 22:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 20:18 [patch 0/2] Fixing AMD cmpxchg "missing lfence" mess Mathieu Desnoyers
2009-04-22 20:18 ` [patch 1/2] x86: cleanup alternative.h Mathieu Desnoyers
2009-04-28 13:05   ` [GIT PULL] " Mathieu Desnoyers
2009-04-28 14:58     ` Ingo Molnar
2009-04-28 15:13       ` [GIT PULL] x86: cleanup alternative.h (v2) Mathieu Desnoyers
2009-04-29  6:17         ` [tip:x86/asm] x86: clean up alternative.h tip-bot for Mathieu Desnoyers
2009-04-29  6:22           ` Mathieu Desnoyers
2009-04-28 17:40       ` [GIT PULL] x86: cleanup alternative.h H. Peter Anvin
2009-04-28 18:11         ` Mathieu Desnoyers
2009-04-28 18:13         ` [GIT PULL] x86: cleanup alternative.h (v3) Mathieu Desnoyers
2009-04-22 20:18 ` [patch 2/2] x86 amd fix cmpxchg read acquire barrier Mathieu Desnoyers
2009-04-22 20:59   ` Alan Cox
2009-04-22 22:47     ` Mathieu Desnoyers [this message]
2009-04-22 22:53       ` Alan Cox
2009-04-22 23:26         ` Mathieu Desnoyers
2009-04-23  8:06   ` Ingo Molnar
2009-04-23 13:19     ` Mathieu Desnoyers
2009-04-23 13:41       ` Arkadiusz Miskiewicz
2009-04-23 22:17         ` Mathieu Desnoyers
2009-04-25  8:19   ` Pavel Machek
2009-05-02 15:55     ` Mathieu Desnoyers

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=20090422224749.GA22718@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andi@firstfloor.org \
    --cc=arekm@maven.pl \
    --cc=avi@qumranet.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    --cc=mingo@elte.hu \
    /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