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 -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 01 Feb 2006 15:04:11 +0000
Delivery-date: Wed, 01 Feb 2006 15:15:21 +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 61e7afb7344b6657246a2a0eec5dc0e3db4b1588
# Parent  f081663ba9417dd03f83c9f463f5a47024eea0a8
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 f081663ba941 -r 61e7afb7344b xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Tue Jan 31 23:48:17 2006
+++ b/xen/arch/ia64/xen/domain.c        Tue Jan 31 23:56:19 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>