]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.arch/x86_64-unwind-annotations
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / x86_64-unwind-annotations
diff --git a/src/patches/suse-2.6.27.31/patches.arch/x86_64-unwind-annotations b/src/patches/suse-2.6.27.31/patches.arch/x86_64-unwind-annotations
new file mode 100644 (file)
index 0000000..a2ee3be
--- /dev/null
@@ -0,0 +1,88 @@
+From: jbeulich@novell.com
+Subject: fix unwind annotations
+Patch-mainline: some parts in 2.6.29
+References: bnc#472783
+
+---
+ arch/x86/kernel/entry_64.S |    8 +++++---
+ arch/x86/kernel/head_64.S  |   13 +++++++++++++
+ 2 files changed, 18 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kernel/entry_64.S
++++ b/arch/x86/kernel/entry_64.S
+@@ -275,12 +275,13 @@ ENTRY(native_usergs_sysret64)
+ ENTRY(ret_from_fork)
+       CFI_DEFAULT_STACK
+       push kernel_eflags(%rip)
+-      CFI_ADJUST_CFA_OFFSET 4
++      CFI_ADJUST_CFA_OFFSET 8
+       popf                            # reset kernel eflags
+-      CFI_ADJUST_CFA_OFFSET -4
++      CFI_ADJUST_CFA_OFFSET -8
+       call schedule_tail
+       GET_THREAD_INFO(%rcx)
+       testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
++      CFI_REMEMBER_STATE
+       jnz rff_trace
+ rff_action:   
+       RESTORE_REST
+@@ -290,6 +291,7 @@ rff_action:        
+       jnz  int_ret_from_sys_call
+       RESTORE_TOP_OF_STACK %rdi,ARGOFFSET
+       jmp ret_from_sys_call
++      CFI_RESTORE_STATE
+ rff_trace:
+       movq %rsp,%rdi
+       call syscall_trace_leave
+@@ -1080,7 +1082,6 @@ error_exit:
+       andl  %edi,%edx
+       jnz  retint_careful
+       jmp retint_swapgs
+-      CFI_ENDPROC
+ error_kernelspace:
+       incl %ebx
+@@ -1098,6 +1099,7 @@ error_kernelspace:
+       cmpq $gs_change,RIP(%rsp)
+         je   error_swapgs
+       jmp  error_sti
++      CFI_ENDPROC
+ KPROBE_END(error_entry)
+       
+        /* Reload gs selector with exception handling */
+--- a/arch/x86/kernel/head_64.S
++++ b/arch/x86/kernel/head_64.S
+@@ -280,6 +280,8 @@ early_idt_handlers:
+ ENTRY(early_idt_handler)
+ #ifdef CONFIG_EARLY_PRINTK
++#include <asm/calling.h>
++#include <asm/dwarf2.h>
+       cmpl $2,early_recursion_flag(%rip)
+       jz  1f
+       incl early_recursion_flag(%rip)
+@@ -295,6 +297,16 @@ ENTRY(early_idt_handler)
+       testl $0x27d00,%eax
+       je 0f
+       popq %r8                # get error code
++
++      CFI_STARTPROC   simple
++      CFI_SIGNAL_FRAME
++      CFI_DEF_CFA     rsp, SS+8-RIP
++#     CFI_REL_OFFSET  ss, SS-RIP
++      CFI_REL_OFFSET  rsp, RSP-RIP
++#     CFI_REL_OFFSET  rflags, EFLAGS-RIP
++#     CFI_REL_OFFSET  cs, CS-RIP
++      CFI_REL_OFFSET  rip, RIP-RIP
++
+ 0:    movq 0(%rsp),%rcx       # get ip
+       movq 8(%rsp),%rdx       # get cs
+       xorl %eax,%eax
+@@ -308,6 +320,7 @@ ENTRY(early_idt_handler)
+       movq 0(%rsp),%rsi       # get rip again
+       call __print_symbol
+ #endif
++      CFI_ENDPROC
+ #endif /* EARLY_PRINTK */
+ 1:    hlt
+       jmp 1b