[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.3] Fix ptr calculation when converting from a VA



commit b3a75d8a744a01200c4dff2e46b69595d80bb496
Author:     Jean-Yves Migeon <jym@xxxxxxxxxx>
AuthorDate: Mon Dec 9 14:30:29 2013 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Dec 9 14:30:29 2013 +0100

    Fix ptr calculation when converting from a VA
    
    The ptr calculation shall take the offset into the page into account
    when ptr is valid.
    
    Reported regression on NetBSD's port-xen with last known working libxen
    being rev 2.9. This corrupts the kernel symbol table when the table is
    not loaded on a page boundary.
    
    Issue was tracked down by FastIce and Jeff Rizzo. See also
    http://mail-index.netbsd.org/port-xen/2013/10/16/msg008088.html
    
    Signed-off-by: Jean-Yves Migeon <jym@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    master commit: cb08944a482a5e80a3ff1113f0735761cc4c6cb8
    master date: 2013-11-29 11:07:01 +0000
---
 tools/libxc/xc_dom.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxc/xc_dom.h b/tools/libxc/xc_dom.h
index 86e23ee..91fbc1f 100644
--- a/tools/libxc/xc_dom.h
+++ b/tools/libxc/xc_dom.h
@@ -335,7 +335,7 @@ static inline void *xc_dom_vaddr_to_ptr(struct xc_dom_image 
*dom,
     if ( ptr == NULL )
         return ptr;
     *safe_region_out = (safe_region_count << XC_DOM_PAGE_SHIFT(dom)) - offset;
-    return ptr;
+    return ptr + offset;
 }
 
 static inline xen_pfn_t xc_dom_p2m_host(struct xc_dom_image *dom, xen_pfn_t 
pfn)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.