]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: jbeulich@novell.com |
2 | Subject: fix unwind annotations | |
3 | Patch-mainline: some parts in 2.6.29 | |
4 | References: bnc#472783 | |
5 | ||
6 | --- | |
7 | arch/x86/kernel/entry_64.S | 8 +++++--- | |
8 | arch/x86/kernel/head_64.S | 13 +++++++++++++ | |
9 | 2 files changed, 18 insertions(+), 3 deletions(-) | |
10 | ||
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) | |
14 | ENTRY(ret_from_fork) | |
15 | CFI_DEFAULT_STACK | |
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 | |
22 | call schedule_tail | |
23 | GET_THREAD_INFO(%rcx) | |
24 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx) | |
25 | + CFI_REMEMBER_STATE | |
26 | jnz rff_trace | |
27 | rff_action: | |
28 | RESTORE_REST | |
29 | @@ -290,6 +291,7 @@ rff_action: | |
30 | jnz int_ret_from_sys_call | |
31 | RESTORE_TOP_OF_STACK %rdi,ARGOFFSET | |
32 | jmp ret_from_sys_call | |
33 | + CFI_RESTORE_STATE | |
34 | rff_trace: | |
35 | movq %rsp,%rdi | |
36 | call syscall_trace_leave | |
37 | @@ -1080,7 +1082,6 @@ error_exit: | |
38 | andl %edi,%edx | |
39 | jnz retint_careful | |
40 | jmp retint_swapgs | |
41 | - CFI_ENDPROC | |
42 | ||
43 | error_kernelspace: | |
44 | incl %ebx | |
45 | @@ -1098,6 +1099,7 @@ error_kernelspace: | |
46 | cmpq $gs_change,RIP(%rsp) | |
47 | je error_swapgs | |
48 | jmp error_sti | |
49 | + CFI_ENDPROC | |
50 | KPROBE_END(error_entry) | |
51 | ||
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: | |
56 | ||
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) | |
62 | jz 1f | |
63 | incl early_recursion_flag(%rip) | |
64 | @@ -295,6 +297,16 @@ ENTRY(early_idt_handler) | |
65 | testl $0x27d00,%eax | |
66 | je 0f | |
67 | popq %r8 # get error code | |
68 | + | |
69 | + CFI_STARTPROC simple | |
70 | + CFI_SIGNAL_FRAME | |
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 | |
77 | + | |
78 | 0: movq 0(%rsp),%rcx # get ip | |
79 | movq 8(%rsp),%rdx # get cs | |
80 | xorl %eax,%eax | |
81 | @@ -308,6 +320,7 @@ ENTRY(early_idt_handler) | |
82 | movq 0(%rsp),%rsi # get rip again | |
83 | call __print_symbol | |
84 | #endif | |
85 | + CFI_ENDPROC | |
86 | #endif /* EARLY_PRINTK */ | |
87 | 1: hlt | |
88 | jmp 1b |