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

[Xen-devel] [PATCH] linux-2.6.18/i386: fix unwind annotations in failsafe callback


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxx>
  • From: "Jan Beulich" <JBeulich@xxxxxxxx>
  • Date: Wed, 16 Jan 2013 12:55:01 +0000
  • Delivery-date: Wed, 16 Jan 2013 12:55:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

This amends c/s 14245:b1f33c3a97fa (when the sparse Linux tree was
still part of the main Xen repo) in that it
- adds a missing annotation to the "pushl $-1"
- moves the RING0_INT_FRAME earlier (after adjusting the code to do the
  stack pointer adjustment before the conditional branch), thus
  increasing the covered region

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/arch/i386/kernel/entry-xen.S
+++ b/arch/i386/kernel/entry-xen.S
@@ -872,12 +872,11 @@ ENTRY(failsafe_callback)
 4:     mov 16(%esp),%gs
        testl %eax,%eax
        popl %eax
-       jz 5f
-       addl $16,%esp           # EAX != 0 => Category 2 (Bad IRET)
-       jmp iret_exc
-5:     addl $16,%esp           # EAX == 0 => Category 1 (Bad segment)
+       leal (%esp,16),%esp
        RING0_INT_FRAME
-       pushl $-1
+       jnz iret_exc            # EAX != 0 => Category 2 (Bad IRET)
+       pushl $-1               # EAX == 0 => Category 1 (Bad segment)
+       CFI_ADJUST_CFA_OFFSET 4
        SAVE_ALL
        jmp ret_from_exception
 .section .fixup,"ax";          \



Attachment: xen-i386-failsafe-adjust.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.