Commit da2e9e1ff40c863a12803c32209baaded3512433
Committed by
Linus Torvalds
1 parent
97db7fbfc7
Exists in
master
and in
7 other branches
[PATCH] Mark unwind info for signal trampolines in vDSOs
Mark unwind info for signal trampolines using the new S augmentation flag introduced in: http://gcc.gnu.org/PR26208. GCC 4.2 (or patched earlier GCC) will be able to special case unwinding through frames right above signal trampolines. As the augmentations start with z flag and S is at the very end of the augmentation string, older GCCs will just skip the S flag as unknown (that's why an augmentation flag was chosen over say a new CFA opcode). Signed-off-by: Jakub Jelinek <jakub@redhat.com> Cc: Andi Kleen <ak@muc.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 4 changed files with 24 additions and 5 deletions Side-by-side Diff
arch/i386/kernel/vsyscall-sigreturn.S
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | .LSTARTCIEDLSI1: |
45 | 45 | .long 0 /* CIE ID */ |
46 | 46 | .byte 1 /* Version number */ |
47 | - .string "zR" /* NUL-terminated augmentation string */ | |
47 | + .string "zRS" /* NUL-terminated augmentation string */ | |
48 | 48 | .uleb128 1 /* Code alignment factor */ |
49 | 49 | .sleb128 -4 /* Data alignment factor */ |
50 | 50 | .byte 8 /* Return address register column */ |
arch/powerpc/kernel/vdso32/sigtramp.S
... | ... | @@ -261,7 +261,7 @@ |
261 | 261 | .Lcie_start: |
262 | 262 | .long 0 /* CIE ID */ |
263 | 263 | .byte 1 /* Version number */ |
264 | - .string "zR" /* NUL-terminated augmentation string */ | |
264 | + .string "zRS" /* NUL-terminated augmentation string */ | |
265 | 265 | .uleb128 4 /* Code alignment factor */ |
266 | 266 | .sleb128 -4 /* Data alignment factor */ |
267 | 267 | .byte 67 /* Return address register column, ap */ |
arch/powerpc/kernel/vdso64/sigtramp.S
... | ... | @@ -263,7 +263,7 @@ |
263 | 263 | .Lcie_start: |
264 | 264 | .long 0 /* CIE ID */ |
265 | 265 | .byte 1 /* Version number */ |
266 | - .string "zR" /* NUL-terminated augmentation string */ | |
266 | + .string "zRS" /* NUL-terminated augmentation string */ | |
267 | 267 | .uleb128 4 /* Code alignment factor */ |
268 | 268 | .sleb128 -8 /* Data alignment factor */ |
269 | 269 | .byte 67 /* Return address register column, ap */ |
arch/x86_64/ia32/vsyscall-sigreturn.S
... | ... | @@ -32,9 +32,28 @@ |
32 | 32 | .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn |
33 | 33 | |
34 | 34 | .section .eh_frame,"a",@progbits |
35 | +.LSTARTFRAMES: | |
36 | + .long .LENDCIES-.LSTARTCIES | |
37 | +.LSTARTCIES: | |
38 | + .long 0 /* CIE ID */ | |
39 | + .byte 1 /* Version number */ | |
40 | + .string "zRS" /* NUL-terminated augmentation string */ | |
41 | + .uleb128 1 /* Code alignment factor */ | |
42 | + .sleb128 -4 /* Data alignment factor */ | |
43 | + .byte 8 /* Return address register column */ | |
44 | + .uleb128 1 /* Augmentation value length */ | |
45 | + .byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */ | |
46 | + .byte 0x0c /* DW_CFA_def_cfa */ | |
47 | + .uleb128 4 | |
48 | + .uleb128 4 | |
49 | + .byte 0x88 /* DW_CFA_offset, column 0x8 */ | |
50 | + .uleb128 1 | |
51 | + .align 4 | |
52 | +.LENDCIES: | |
53 | + | |
35 | 54 | .long .LENDFDE2-.LSTARTFDE2 /* Length FDE */ |
36 | 55 | .LSTARTFDE2: |
37 | - .long .LSTARTFDE2-.LSTARTFRAME /* CIE pointer */ | |
56 | + .long .LSTARTFDE2-.LSTARTFRAMES /* CIE pointer */ | |
38 | 57 | /* HACK: The dwarf2 unwind routines will subtract 1 from the |
39 | 58 | return address to get an address in the middle of the |
40 | 59 | presumed call instruction. Since we didn't get here via |
... | ... | @@ -97,7 +116,7 @@ |
97 | 116 | |
98 | 117 | .long .LENDFDE3-.LSTARTFDE3 /* Length FDE */ |
99 | 118 | .LSTARTFDE3: |
100 | - .long .LSTARTFDE3-.LSTARTFRAME /* CIE pointer */ | |
119 | + .long .LSTARTFDE3-.LSTARTFRAMES /* CIE pointer */ | |
101 | 120 | /* HACK: See above wrt unwind library assumptions. */ |
102 | 121 | .long .LSTART_rt_sigreturn-1-. /* PC-relative start address */ |
103 | 122 | .long .LEND_rt_sigreturn-.LSTART_rt_sigreturn+1 |