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

Re: [Xen-devel] libxc: correctly unmap pages after core-dumping a pv gue

To: Markus Groß <gross@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] libxc: correctly unmap pages after core-dumping a pv guest
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 24 May 2011 16:07:03 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 24 May 2011 08:07:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201105231342.28471.gross@xxxxxxxxxxxxx>
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>
Newsgroups: chiark.mail.xen.devel
References: <201105231342.28471.gross@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Markus Groß writes ("[Xen-devel] libxc: correctly unmap pages after 
core-dumping a pv guest"):
> But to unmap the pages later, the dinfo->p2m_size has to be set accordingly.
> This was not done, instead a variable named p2m_size was set.
> This way P2M_FL_ENTRIES was always zero and the pages were left mapped.
> 
> The following patch fixes this.

Thanks.  The existing code here is pretty unfortunate.

In xc_domain_dumpcore_via_callback where you make your change, "dinfo"
refers to a struct domain_info_context which is local to that
function.  But in the called function xc_core_arch_map_p2m_rw, "dinfo"
refers to another identical structure allocated locally to the small
wrapper function xc_core_arch_map_p2m.  All rather tangled.

But, anyway, your change is correct so I have applied it.

Next time, though, can you please be sure to add a Signed-off-by line,
to signify your certification in accordance with the Developer's
Certificate of Origin ?  In this case I'll go ahead as it's only a
couple of lines.

Thanks,
Ian.

>From Documentation/SubmittingPatches in the Linux kernel tree:
 
        Developer's Certificate of Origin 1.1
 
        By making a contribution to this project, I certify that:
 
        (a) The contribution was created in whole or in part by me and I
            have the right to submit it under the open source license
            indicated in the file; or
 
        (b) The contribution is based upon previous work that, to the best
            of my knowledge, is covered under an appropriate open source
            license and I have the right under that license to submit that
            work with modifications, whether created in whole or in part
            by me, under the same open source license (unless I am
            permitted to submit under a different license), as indicated
            in the file; or
 
        (c) The contribution was provided directly to me by some other
            person who certified (a), (b) or (c) and I have not modified
            it.
 
        (d) I understand and agree that this project and the contribution
            are public and that a record of the contribution (including all
            personal information I submit with it, including my sign-off) is
            maintained indefinitely and may be redistributed consistent with
            this project or the open source license(s) involved.

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