aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-01-11 16:41:59 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 22:01:09 -0500
commit2765130b020c22f803afba74772f33f2ad13bf28 (patch)
tree4d6b35c25c7031f18c67608beea6f33f2ce2e783 /arch/x86_64
parent6076399e9561a92388ed320dc7105595f8db1ba9 (diff)
[PATCH] x86_64: More CFI fixes for 32bit entry code
Frame unwind information was still incorrect for ia32_ptregs_common (sorry, my fault), and could be improved for some of the other entry points. Signed-Off-By: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/ia32/ia32entry.S33
1 files changed, 28 insertions, 5 deletions
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index 2ff07b47ea9c..8172e61c3f6f 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -35,6 +35,18 @@
35 movq %rax,R8(%rsp) 35 movq %rax,R8(%rsp)
36 .endm 36 .endm
37 37
38 .macro CFI_STARTPROC32 simple
39 CFI_STARTPROC \simple
40 CFI_UNDEFINED r8
41 CFI_UNDEFINED r9
42 CFI_UNDEFINED r10
43 CFI_UNDEFINED r11
44 CFI_UNDEFINED r12
45 CFI_UNDEFINED r13
46 CFI_UNDEFINED r14
47 CFI_UNDEFINED r15
48 .endm
49
38/* 50/*
39 * 32bit SYSENTER instruction entry. 51 * 32bit SYSENTER instruction entry.
40 * 52 *
@@ -55,7 +67,7 @@
55 * with the int 0x80 path. 67 * with the int 0x80 path.
56 */ 68 */
57ENTRY(ia32_sysenter_target) 69ENTRY(ia32_sysenter_target)
58 CFI_STARTPROC simple 70 CFI_STARTPROC32 simple
59 CFI_DEF_CFA rsp,0 71 CFI_DEF_CFA rsp,0
60 CFI_REGISTER rsp,rbp 72 CFI_REGISTER rsp,rbp
61 swapgs 73 swapgs
@@ -161,7 +173,7 @@ sysenter_tracesys:
161 * with the int 0x80 path. 173 * with the int 0x80 path.
162 */ 174 */
163ENTRY(ia32_cstar_target) 175ENTRY(ia32_cstar_target)
164 CFI_STARTPROC simple 176 CFI_STARTPROC32 simple
165 CFI_DEF_CFA rsp,0 177 CFI_DEF_CFA rsp,0
166 CFI_REGISTER rip,rcx 178 CFI_REGISTER rip,rcx
167 /*CFI_REGISTER rflags,r11*/ 179 /*CFI_REGISTER rflags,r11*/
@@ -318,7 +330,7 @@ quiet_ni_syscall:
318 jmp ia32_ptregs_common 330 jmp ia32_ptregs_common
319 .endm 331 .endm
320 332
321 CFI_STARTPROC 333 CFI_STARTPROC32
322 334
323 PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi 335 PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi
324 PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi 336 PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi
@@ -333,8 +345,19 @@ quiet_ni_syscall:
333 345
334ENTRY(ia32_ptregs_common) 346ENTRY(ia32_ptregs_common)
335 popq %r11 347 popq %r11
336 CFI_ADJUST_CFA_OFFSET -8 348 CFI_ENDPROC
337 CFI_REGISTER rip, r11 349 CFI_STARTPROC32 simple
350 CFI_DEF_CFA rsp,SS+8-ARGOFFSET
351 CFI_REL_OFFSET rax,RAX-ARGOFFSET
352 CFI_REL_OFFSET rcx,RCX-ARGOFFSET
353 CFI_REL_OFFSET rdx,RDX-ARGOFFSET
354 CFI_REL_OFFSET rsi,RSI-ARGOFFSET
355 CFI_REL_OFFSET rdi,RDI-ARGOFFSET
356 CFI_REL_OFFSET rip,RIP-ARGOFFSET
357/* CFI_REL_OFFSET cs,CS-ARGOFFSET*/
358/* CFI_REL_OFFSET rflags,EFLAGS-ARGOFFSET*/
359 CFI_REL_OFFSET rsp,RSP-ARGOFFSET
360/* CFI_REL_OFFSET ss,SS-ARGOFFSET*/
338 SAVE_REST 361 SAVE_REST
339 call *%rax 362 call *%rax
340 RESTORE_REST 363 RESTORE_REST