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] [xen-unstable] x86: Avoid dereference of 'struct page_in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Avoid dereference of 'struct page_info' for invalid MFNs.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:41:00 -0700
Delivery-date: Thu, 20 Mar 2008 05:45:17 -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.fraser@xxxxxxxxxx>
# Date 1205921701 0
# Node ID 4af873c95d0b7118ffaea9a4cf96fd92338d144c
# Parent  0901aec1d00b685a0922e916ea9a8e60ea14b8ca
x86: Avoid dereference of 'struct page_info' for invalid MFNs.
Introduced by my changes to Samuel's transitive-privilege patch.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 0901aec1d00b -r 4af873c95d0b xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Mar 19 00:01:25 2008 +0000
+++ b/xen/arch/x86/mm.c Wed Mar 19 10:15:01 2008 +0000
@@ -645,7 +645,7 @@ get_page_from_l1e(
     struct page_info *page = mfn_to_page(mfn);
     uint32_t l1f = l1e_get_flags(l1e);
     struct vcpu *curr = current;
-    struct domain *owner = page_get_owner(page);
+    struct domain *owner;
     int okay;
 
     if ( !(l1f & _PAGE_PRESENT) )
@@ -680,6 +680,7 @@ get_page_from_l1e(
      * until pvfb supports granted mappings. At that time this minor hack
      * can go away.
      */
+    owner = page_get_owner(page);
     if ( unlikely(d != owner) && (owner != NULL) &&
          (d != curr->domain) && IS_PRIV_FOR(d, owner) )
         d = owner;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Avoid dereference of 'struct page_info' for invalid MFNs., Xen patchbot-unstable <=