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-3.4-testing] x86: add an extra check when validatin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86: add an extra check when validating a huge pv L2 entry
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Oct 2009 08:25:19 -0700
Delivery-date: Thu, 01 Oct 2009 08:25:58 -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 1254409538 -3600
# Node ID e34a589a1bc896fb9582a1387f99cda5a1624807
# Parent  c3767592b4a84987f9b0df87b554262ea9d00845
x86: add an extra check when validating a huge pv L2 entry

While get_page_and_type_from_pagenr() (through get_page_from_pagenr())
does the needed mfn_valid() check, get_data_page() doesn't and, it
being passed a struct page_info pointer, really expects it's caller(s)
to do.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   20189:d2a32e24fe50
xen-unstable date:        Wed Sep 09 16:39:41 2009 +0100
---
 xen/arch/x86/mm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r c3767592b4a8 -r e34a589a1bc8 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Thu Oct 01 16:00:10 2009 +0100
+++ b/xen/arch/x86/mm.c Thu Oct 01 16:05:38 2009 +0100
@@ -844,14 +844,16 @@ get_page_from_l2e(
         int writeable = !!(l2e_get_flags(l2e) & _PAGE_RW);
   
         do {
-            rc = get_data_page(mfn_to_page(m), d, writeable);
-            if ( unlikely(!rc) )
+            if ( !mfn_valid(m) ||
+                 !get_data_page(mfn_to_page(m), d, writeable) )
             {
                 while ( m-- > mfn )
                     put_data_page(mfn_to_page(m), writeable);
                 return -EINVAL;
             }
         } while ( m++ < (mfn + (L1_PAGETABLE_ENTRIES-1)) );
+
+        rc = 1;
 
 #ifdef __x86_64__
         map_pages_to_xen(

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] x86: add an extra check when validating a huge pv L2 entry, Xen patchbot-3.4-testing <=