public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Andrew Morton <akpm@osdl.com>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Hugh Dickins <hugh@veritas.com>,
	Jan Beulich <jbeulich@novell.com>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
	Pratap Subrahmanyam <pratap@vmware.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Zachary Amsden <zach@vmware.com>
Subject: [PATCH 2/2] I386 convert pae wmb to non smp
Date: Wed, 26 Apr 2006 15:03:52 -0700	[thread overview]
Message-ID: <200604262203.k3QM3qOC009581@zach-dev.vmware.com> (raw)

Similar to the last bug, on set_pte, we don't want the compiler to re-order
the write of the PTE, even in non-SMP configurations, since if the write of
the low word occurs first, the TLB could prefetch a bad highmem mapping which
has been aliased into low memory.

Signed-off-by: Zachary Amsden <zach@vmware.com>

Index: linux-2.6.17-rc/include/asm-i386/pgtable-3level.h
===================================================================
--- linux-2.6.17-rc.orig/include/asm-i386/pgtable-3level.h	2006-04-26 08:38:57.000000000 -0700
+++ linux-2.6.17-rc/include/asm-i386/pgtable-3level.h	2006-04-26 14:45:12.000000000 -0700
@@ -53,7 +53,7 @@ static inline int pte_exec_kernel(pte_t 
 static inline void set_pte(pte_t *ptep, pte_t pte)
 {
 	ptep->pte_high = pte.pte_high;
-	smp_wmb();
+	wmb();
 	ptep->pte_low = pte.pte_low;
 }
 #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)

             reply	other threads:[~2006-04-26 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-26 22:03 Zachary Amsden [this message]
2006-04-27  0:00 ` [PATCH 2/2] I386 convert pae wmb to non smp Nick Piggin
2006-04-27  1:09   ` Zachary Amsden
2006-04-27  3:30     ` Nick Piggin
2006-04-27  8:21       ` Keir Fraser

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=200604262203.k3QM3qOC009581@zach-dev.vmware.com \
    --to=zach@vmware.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=akpm@osdl.com \
    --cc=hugh@veritas.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pratap@vmware.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