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] xen/x86-64: kern_addr_valid() must no

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen/x86-64: kern_addr_valid() must not walk page tables mapping hypervisor space
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Apr 2010 06:35:03 -0700
Delivery-date: Tue, 20 Apr 2010 06:35:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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.fraser@xxxxxxxxxx>
# Date 1271090074 -3600
# Node ID fbe371367af64674d8eefa59924890a7b783f769
# Parent  11175e60d39349f7daf5672481f25b9546f0918e
xen/x86-64: kern_addr_valid() must not walk page tables mapping hypervisor space

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/x86_64/mm/init-xen.c |   13 +++++++++++++
 1 files changed, 13 insertions(+)

diff -r 11175e60d393 -r fbe371367af6 arch/x86_64/mm/init-xen.c
--- a/arch/x86_64/mm/init-xen.c Tue Mar 30 18:28:34 2010 +0100
+++ b/arch/x86_64/mm/init-xen.c Mon Apr 12 17:34:34 2010 +0100
@@ -1149,6 +1149,19 @@ int kern_addr_valid(unsigned long addr)
        if (above != 0 && above != -1UL)
                return 0; 
        
+#ifdef CONFIG_XEN
+       /*
+        * Don't walk page tables for hypervisor addresses, but allow
+        * the M2P table to be accessed through e.g. /proc/kcore.
+        */
+       if (addr >= (unsigned long)machine_to_phys_mapping &&
+           addr < (unsigned long)(machine_to_phys_mapping +
+                                  (1UL << machine_to_phys_order)))
+               return 1;
+       if (addr >= HYPERVISOR_VIRT_START && addr < HYPERVISOR_VIRT_END)
+               return 0;
+#endif
+
        pgd = pgd_offset_k(addr);
        if (pgd_none(*pgd))
                return 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] xen/x86-64: kern_addr_valid() must not walk page tables mapping hypervisor space, Xen patchbot-linux-2.6.18-xen <=