Commit a34107b5 authored by Jan Beulich's avatar Jan Beulich Committed by Ingo Molnar

i386: Add unwind directives to syscall ptregs stubs

When these stubs are actual functions (i.e. having a return
instruction) and have stack manipulation instructions in them,
they should also be annotated to allow unwinding through them.
Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Acked-by: default avatarAlexander van Heukelum <heukelum@fastmail.fm>
LKML-Reference: <4C7FBCF00200007800013F99@vpn.id2.novell.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b1cccb1b
...@@ -750,14 +750,18 @@ ptregs_##name: \ ...@@ -750,14 +750,18 @@ ptregs_##name: \
#define PTREGSCALL3(name) \ #define PTREGSCALL3(name) \
ALIGN; \ ALIGN; \
ptregs_##name: \ ptregs_##name: \
CFI_STARTPROC; \
leal 4(%esp),%eax; \ leal 4(%esp),%eax; \
pushl %eax; \ pushl_cfi %eax; \
movl PT_EDX(%eax),%ecx; \ movl PT_EDX(%eax),%ecx; \
movl PT_ECX(%eax),%edx; \ movl PT_ECX(%eax),%edx; \
movl PT_EBX(%eax),%eax; \ movl PT_EBX(%eax),%eax; \
call sys_##name; \ call sys_##name; \
addl $4,%esp; \ addl $4,%esp; \
ret CFI_ADJUST_CFA_OFFSET -4; \
ret; \
CFI_ENDPROC; \
ENDPROC(ptregs_##name)
PTREGSCALL1(iopl) PTREGSCALL1(iopl)
PTREGSCALL0(fork) PTREGSCALL0(fork)
...@@ -772,15 +776,19 @@ PTREGSCALL1(vm86old) ...@@ -772,15 +776,19 @@ PTREGSCALL1(vm86old)
/* Clone is an oddball. The 4th arg is in %edi */ /* Clone is an oddball. The 4th arg is in %edi */
ALIGN; ALIGN;
ptregs_clone: ptregs_clone:
CFI_STARTPROC
leal 4(%esp),%eax leal 4(%esp),%eax
pushl %eax pushl_cfi %eax
pushl PT_EDI(%eax) pushl_cfi PT_EDI(%eax)
movl PT_EDX(%eax),%ecx movl PT_EDX(%eax),%ecx
movl PT_ECX(%eax),%edx movl PT_ECX(%eax),%edx
movl PT_EBX(%eax),%eax movl PT_EBX(%eax),%eax
call sys_clone call sys_clone
addl $8,%esp addl $8,%esp
CFI_ADJUST_CFA_OFFSET -8
ret ret
CFI_ENDPROC
ENDPROC(ptregs_clone)
.macro FIXUP_ESPFIX_STACK .macro FIXUP_ESPFIX_STACK
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment