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] Fix memory scrubbing to deal with memguarded Xen heap pa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix memory scrubbing to deal with memguarded Xen heap pages.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Sat, 21 May 2005 10:42:50 +0000
Delivery-date: Sun, 22 May 2005 17:03:28 +0000
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/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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1504, 2005/05/21 11:42:50+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Fix memory scrubbing to deal with memguarded Xen heap pages.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 page_alloc.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)


diff -Nru a/xen/common/page_alloc.c b/xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   2005-05-22 13:04:12 -04:00
+++ b/xen/common/page_alloc.c   2005-05-22 13:04:12 -04:00
@@ -375,9 +375,19 @@
         /* Re-check page status with lock held. */
         if ( !allocated_in_map(pfn) )
         {
-            p = map_domain_mem(pfn << PAGE_SHIFT);
-            clear_page(p);
-            unmap_domain_mem(p);
+            if ( IS_XEN_HEAP_FRAME(pfn_to_page(pfn)) )
+            {
+                p = page_to_virt(pfn_to_page(pfn));
+                memguard_unguard_range(p, PAGE_SIZE);
+                clear_page(p);
+                memguard_guard_range(p, PAGE_SIZE);
+            }
+            else
+            {
+                p = map_domain_mem(pfn << PAGE_SHIFT);
+                clear_page(p);
+                unmap_domain_mem(p);
+            }
         }
         
         spin_unlock_irqrestore(&heap_lock, flags);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix memory scrubbing to deal with memguarded Xen heap pages., BitKeeper Bot <=