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] [Mini-OS] Fix stack closures

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [Mini-OS] Fix stack closures
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Nov 2007 13:50:08 -0800
Delivery-date: Fri, 23 Nov 2007 13:50:32 -0800
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 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [Mini-OS] Fix stack closures, Xen patchbot-unstable <=