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-unstable] [IA64] Prevent domains to itc/ptd in shar

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Prevent domains to itc/ptd in shared_info_va.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Oct 2006 12:10:34 +0000
Delivery-date: Thu, 26 Oct 2006 05:12:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 64290e7622d2bd214b3c21f58b3f420a35b4c610
# Parent  6268aa7b91773953580279954d5cb6fed226255f
[IA64] Prevent domains to itc/ptd in shared_info_va.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 xen/arch/ia64/xen/vcpu.c       |   11 ++++++++++-
 xen/include/public/arch-ia64.h |    1 +
 2 files changed, 11 insertions(+), 1 deletion(-)

diff -r 6268aa7b9177 -r 64290e7622d2 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Mon Oct 02 21:27:49 2006 -0600
+++ b/xen/arch/ia64/xen/vcpu.c  Mon Oct 02 21:30:51 2006 -0600
@@ -1314,12 +1314,21 @@ static inline void
 static inline void
 check_xen_space_overlap (const char *func, u64 base, u64 page_size)
 {
+       /* Overlaps can occur only in region 7.
+          (This is an optimization to bypass all the checks).  */
+       if (REGION_NUMBER(base) != 7)
+               return;
+
        /* Mask LSBs of base.  */
        base &= ~(page_size - 1);
 
        /* FIXME: ideally an MCA should be generated...  */
        if (range_overlap (HYPERVISOR_VIRT_START, HYPERVISOR_VIRT_END,
-                          base, base + page_size))
+                          base, base + page_size)
+           || range_overlap(current->domain->arch.shared_info_va,
+                            current->domain->arch.shared_info_va 
+                            + XSI_SIZE + XMAPPEDREGS_SIZE,
+                            base, base + page_size))
                panic_domain (NULL, "%s on Xen virtual space (%lx)\n",
                              func, base);
 }
diff -r 6268aa7b9177 -r 64290e7622d2 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Mon Oct 02 21:27:49 2006 -0600
+++ b/xen/include/public/arch-ia64.h    Mon Oct 02 21:30:51 2006 -0600
@@ -397,6 +397,7 @@ struct xen_ia64_boot_param {
 #define XSI_SIZE                       (1 << XSI_SHIFT)
 /* Log size of mapped_regs area (64 KB - only 4KB is used).  */
 #define XMAPPEDREGS_SHIFT              12
+#define XMAPPEDREGS_SIZE               (1 << XMAPPEDREGS_SHIFT)
 /* Offset of XASI (Xen arch shared info) wrt XSI_BASE.  */
 #define XMAPPEDREGS_OFS                        XSI_SIZE
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Prevent domains to itc/ptd in shared_info_va., Xen patchbot-unstable <=