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.2-testing] xc_save: use correct size when unmappi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] xc_save: use correct size when unmapping live p2m.
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Oct 2008 00:20:30 -0700
Delivery-date: Fri, 17 Oct 2008 00:20:33 -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 1224177438 -3600
# Node ID bde37dfe6963903e47d49161c77e173355e41eb4
# Parent  7c0934ea1fe546f3d7c02b30d03cd30d3d9cad91
xc_save: use correct size when unmapping live p2m.

Otherwise we unmap a larger region than was mapped when saving 32 bit
guest from 64 bit tools, leading to badness.

The equivalent change was made to the restore code in
18329:ca7dd77d5365

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
xen-unstable changeset:   18558:ccf0205255e1
xen-unstable date:        Mon Sep 29 11:00:29 2008 +0100
---
 tools/libxc/xc_domain_save.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 7c0934ea1fe5 -r bde37dfe6963 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Thu Oct 16 18:16:19 2008 +0100
+++ b/tools/libxc/xc_domain_save.c      Thu Oct 16 18:17:18 2008 +0100
@@ -778,7 +778,7 @@ static xen_pfn_t *map_and_save_p2m_table
  out:
     
     if ( !success && p2m )
-        munmap(p2m, ROUNDUP(p2m_size * sizeof(xen_pfn_t), PAGE_SHIFT));
+        munmap(p2m, P2M_FLL_ENTRIES * PAGE_SIZE);
 
     if ( live_p2m_frame_list_list )
         munmap(live_p2m_frame_list_list, PAGE_SIZE);
@@ -1607,7 +1607,7 @@ int xc_domain_save(int xc_handle, int io
         munmap(live_shinfo, PAGE_SIZE);
 
     if ( live_p2m )
-        munmap(live_p2m, ROUNDUP(p2m_size * sizeof(xen_pfn_t), PAGE_SHIFT));
+        munmap(live_p2m, P2M_FLL_ENTRIES * PAGE_SIZE);
 
     if ( live_m2p )
         munmap(live_m2p, M2P_SIZE(max_mfn));

_______________________________________________
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.2-testing] xc_save: use correct size when unmapping live p2m., Xen patchbot-3.2-testing <=