WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] Fix ptep_get_and_clear(): atomic oper

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Fix ptep_get_and_clear(): atomic operation required on user ptes to
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Oct 2007 05:50:28 -0700
Delivery-date: Sat, 20 Oct 2007 05:52:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192782065 -3600
# Node ID 8302e7fad91e9620ef5160c4b54d22d7b97666c8
# Parent  7837d0ec57bce4578c17018ca1ef1ded64fe1dd3
Fix ptep_get_and_clear(): atomic operation required on user ptes to
get correct snapshot of A/D bits.

Error pointed out by Jan Beulich.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 include/asm-i386/mach-xen/asm/pgtable-2level.h |    2 +-
 include/asm-i386/mach-xen/asm/pgtable-3level.h |    2 +-
 include/asm-x86_64/mach-xen/asm/pgtable.h      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff -r 7837d0ec57bc -r 8302e7fad91e 
include/asm-i386/mach-xen/asm/pgtable-2level.h
--- a/include/asm-i386/mach-xen/asm/pgtable-2level.h    Thu Oct 18 16:18:48 
2007 +0100
+++ b/include/asm-i386/mach-xen/asm/pgtable-2level.h    Fri Oct 19 09:21:05 
2007 +0100
@@ -44,7 +44,7 @@ static inline pte_t ptep_get_and_clear(s
 {
        pte_t pte = *ptep;
        if (!pte_none(pte)) {
-               if ((mm != current->mm && mm != &init_mm) ||
+               if ((mm != &init_mm) ||
                    HYPERVISOR_update_va_mapping(addr, __pte(0), 0))
                        pte = __pte_ma(xchg(&ptep->pte_low, 0));
        }
diff -r 7837d0ec57bc -r 8302e7fad91e 
include/asm-i386/mach-xen/asm/pgtable-3level.h
--- a/include/asm-i386/mach-xen/asm/pgtable-3level.h    Thu Oct 18 16:18:48 
2007 +0100
+++ b/include/asm-i386/mach-xen/asm/pgtable-3level.h    Fri Oct 19 09:21:05 
2007 +0100
@@ -128,7 +128,7 @@ static inline pte_t ptep_get_and_clear(s
 {
        pte_t pte = *ptep;
        if (!pte_none(pte)) {
-               if ((mm != current->mm && mm != &init_mm) ||
+               if ((mm != &init_mm) ||
                    HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) {
                        uint64_t val = __pte_val(pte);
                        if (__cmpxchg64(ptep, val, 0) != val) {
diff -r 7837d0ec57bc -r 8302e7fad91e include/asm-x86_64/mach-xen/asm/pgtable.h
--- a/include/asm-x86_64/mach-xen/asm/pgtable.h Thu Oct 18 16:18:48 2007 +0100
+++ b/include/asm-x86_64/mach-xen/asm/pgtable.h Fri Oct 19 09:21:05 2007 +0100
@@ -285,7 +285,7 @@ static inline pte_t ptep_get_and_clear(s
 {
        pte_t pte = *ptep;
        if (!pte_none(pte)) {
-               if ((mm != current->mm && mm != &init_mm) ||
+               if ((mm != &init_mm) ||
                    HYPERVISOR_update_va_mapping(addr, __pte(0), 0))
                        pte = __pte_ma(xchg(&ptep->pte, 0));
        }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Fix ptep_get_and_clear(): atomic operation required on user ptes to, Xen patchbot-linux-2.6.18-xen <=