1 From: jbeulich@novell.com
2 Subject: fix unwind annotations
3 Patch-mainline: some parts in 2.6.29
7 arch/x86/kernel/entry_64.S | 8 +++++---
8 arch/x86/kernel/head_64.S | 13 +++++++++++++
9 2 files changed, 18 insertions(+), 3 deletions(-)
11 --- a/arch/x86/kernel/entry_64.S
12 +++ b/arch/x86/kernel/entry_64.S
13 @@ -275,12 +275,13 @@ ENTRY(native_usergs_sysret64)
16 push kernel_eflags(%rip)
17 - CFI_ADJUST_CFA_OFFSET 4
18 + CFI_ADJUST_CFA_OFFSET 8
19 popf # reset kernel eflags
20 - CFI_ADJUST_CFA_OFFSET -4
21 + CFI_ADJUST_CFA_OFFSET -8
24 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
29 @@ -290,6 +291,7 @@ rff_action:
30 jnz int_ret_from_sys_call
31 RESTORE_TOP_OF_STACK %rdi,ARGOFFSET
36 call syscall_trace_leave
37 @@ -1080,7 +1082,6 @@ error_exit:
45 @@ -1098,6 +1099,7 @@ error_kernelspace:
46 cmpq $gs_change,RIP(%rsp)
50 KPROBE_END(error_entry)
52 /* Reload gs selector with exception handling */
53 --- a/arch/x86/kernel/head_64.S
54 +++ b/arch/x86/kernel/head_64.S
55 @@ -280,6 +280,8 @@ early_idt_handlers:
57 ENTRY(early_idt_handler)
58 #ifdef CONFIG_EARLY_PRINTK
59 +#include <asm/calling.h>
60 +#include <asm/dwarf2.h>
61 cmpl $2,early_recursion_flag(%rip)
63 incl early_recursion_flag(%rip)
64 @@ -295,6 +297,16 @@ ENTRY(early_idt_handler)
67 popq %r8 # get error code
69 + CFI_STARTPROC simple
71 + CFI_DEF_CFA rsp, SS+8-RIP
72 +# CFI_REL_OFFSET ss, SS-RIP
73 + CFI_REL_OFFSET rsp, RSP-RIP
74 +# CFI_REL_OFFSET rflags, EFLAGS-RIP
75 +# CFI_REL_OFFSET cs, CS-RIP
76 + CFI_REL_OFFSET rip, RIP-RIP
78 0: movq 0(%rsp),%rcx # get ip
79 movq 8(%rsp),%rdx # get cs
81 @@ -308,6 +320,7 @@ ENTRY(early_idt_handler)
82 movq 0(%rsp),%rsi # get rip again
86 #endif /* EARLY_PRINTK */