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-devel

[Xen-devel] [PATCH] Don't scrub broken pages

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Don't scrub broken pages
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Mon, 8 Feb 2010 17:39:39 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 08 Feb 2010 01:41:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqooqJaZIIl3hlTRnWmHF5qWf57jg==
Thread-topic: [PATCH] Don't scrub broken pages
Don't scrub broken pages

Don't touch the poison pages when scrub the pages. Consuming poison page will 
contaminate the CPU context and may cause system crash.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>

diff -r 08c3ff62b8e9 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Mon Feb 08 13:27:41 2010 +0800
+++ b/xen/common/page_alloc.c   Mon Feb 08 14:32:32 2010 +0800
@@ -1256,6 +1256,9 @@ void scrub_one_page(struct page_info *pg
 {
     void *p = __map_domain_page(pg);
 
+    if ( unlikely(pg->count_info & PGC_broken) )
+        return;
+
 #ifndef NDEBUG
     /* Avoid callers relying on allocations returning zeroed pages. */
     memset(p, 0xc2, PAGE_SIZE);


Attachment: scrub_page.patch
Description: scrub_page.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Don't scrub broken pages, Jiang, Yunhong <=