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-ia64-devel

[Xen-ia64-devel] [PATCH] fix stack corruption bug on ia64

To: Keir.Fraser@xxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] fix stack corruption bug on ia64
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Tue, 31 Jan 2006 16:43:45 -0700
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 31 Jan 2006 23:53:25 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: LOSL
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Keir,

   This is an outstanding fix for the xen-ia64-unstable tree.  Dan
suggested I send it to you directly for xen-unstable to make sure it
gets in for 3.0.1.  The memset in init_switch_stack is overwriting the
processor stack.  We need to avoid manipulating the switch stack area of
the currently running cpu.  Original patch by Kevin Tian.  Thanks,

        Alex


Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

--- a/xen/arch/ia64/xen/domain.c        Tue Jan 31 17:39:35 2006
+++ b/xen/arch/ia64/xen/domain.c        Tue Jan 31 10:37:25 2006
@@ -157,14 +157,14 @@
            if ((v = alloc_xenheap_pages(KERNEL_STACK_SIZE_ORDER)) == NULL)
                return NULL;
            memset(v, 0, sizeof(*v)); 
-       }
-
-       ti = alloc_thread_info(v);
-       /* Clear thread_info to clear some important fields, like
-        * preempt_count
-        */
-       memset(ti, 0, sizeof(struct thread_info));
-       init_switch_stack(v);
+
+           ti = alloc_thread_info(v);
+           /* Clear thread_info to clear some important fields, like
+            * preempt_count
+            */
+           memset(ti, 0, sizeof(struct thread_info));
+           init_switch_stack(v);
+       }
 
        if (!is_idle_domain(d)) {
            v->arch.privregs = 



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] fix stack corruption bug on ia64, Alex Williamson <=