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

[Xen-changelog] [xen-unstable] [Mini-OS] Fix stack closures



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195834956 0
# Node ID f28d36628de80b05fcab24094684d95a17026db1
# Parent  75cb82d277bed86861e125f402e991961cd2581f
[Mini-OS] Fix stack closures

So as to make backtracing tools happy, correctly close x86 stacks for
new threads as well as on callback in the x86_32 case since there is
no unwind marker.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxx>
---
 extras/mini-os/arch/x86/x86_32.S |    3 +++
 extras/mini-os/arch/x86/x86_64.S |    2 ++
 2 files changed, 5 insertions(+)

diff -r 75cb82d277be -r f28d36628de8 extras/mini-os/arch/x86/x86_32.S
--- a/extras/mini-os/arch/x86/x86_32.S  Fri Nov 23 16:22:13 2007 +0000
+++ b/extras/mini-os/arch/x86/x86_32.S  Fri Nov 23 16:22:36 2007 +0000
@@ -126,6 +126,7 @@ ENTRY(hypervisor_callback)
         cmpl $ecrit,%eax
         jb   critical_region_fixup
 11:     push %esp
+        xorl %ebp,%ebp
         call do_hypervisor_callback
         add  $4,%esp
         movl HYPERVISOR_shared_info,%esi
@@ -281,6 +282,8 @@ ENTRY(thread_starter)
 ENTRY(thread_starter)
     popl %eax
     popl %ebx
+    pushl $0
+    xorl %ebp,%ebp
     pushl %eax
     call *%ebx
     call exit_thread 
diff -r 75cb82d277be -r f28d36628de8 extras/mini-os/arch/x86/x86_64.S
--- a/extras/mini-os/arch/x86/x86_64.S  Fri Nov 23 16:22:13 2007 +0000
+++ b/extras/mini-os/arch/x86/x86_64.S  Fri Nov 23 16:22:36 2007 +0000
@@ -380,6 +380,8 @@ ENTRY(thread_starter)
 ENTRY(thread_starter)
         popq %rdi
         popq %rbx
+        pushq $0
+        xorq %rbp,%rbp
         call *%rbx
         call exit_thread 
         

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.