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] The memset in init_switch_stack is overwriting the proce

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The memset in init_switch_stack is overwriting the processor stack.
From: Xen patchbot -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Feb 2006 01:08:15 +0000
Delivery-date: Wed, 08 Feb 2006 01:20:06 +0000
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/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 8961787f6668a954700f5d5ed00b8839e09a1dd8
# Parent  bc9f304c88a178f2216457e03964b399cc5e5028
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.

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

diff -r bc9f304c88a1 -r 8961787f6668 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Tue Jan 31 23:49:56 2006
+++ b/xen/arch/ia64/xen/domain.c        Tue Jan 31 23:54:41 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>