Commit e258e4e0 authored by Brian Gerst's avatar Brian Gerst Committed by H. Peter Anvin

x86-32: Add new pt_regs stubs

Add new stubs which add the pt_regs pointer as the last arg, matching
64-bit.  This will allow these syscalls to be easily merged.
Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
LKML-Reference: <1260403316-5679-2-git-send-email-brgerst@gmail.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 2588465b
...@@ -725,22 +725,49 @@ END(syscall_badsys) ...@@ -725,22 +725,49 @@ END(syscall_badsys)
/* /*
* System calls that need a pt_regs pointer. * System calls that need a pt_regs pointer.
*/ */
#define PTREGSCALL(name) \ #define PTREGSCALL0(name) \
ALIGN; \ ALIGN; \
ptregs_##name: \ ptregs_##name: \
leal 4(%esp),%eax; \ leal 4(%esp),%eax; \
jmp sys_##name; jmp sys_##name;
PTREGSCALL(iopl) #define PTREGSCALL1(name) \
PTREGSCALL(fork) ALIGN; \
PTREGSCALL(clone) ptregs_##name: \
PTREGSCALL(vfork) leal 4(%esp),%edx; \
PTREGSCALL(execve) movl PT_EBX(%edx),%eax; \
PTREGSCALL(sigaltstack) jmp sys_##name;
PTREGSCALL(sigreturn)
PTREGSCALL(rt_sigreturn) #define PTREGSCALL2(name) \
PTREGSCALL(vm86) ALIGN; \
PTREGSCALL(vm86old) ptregs_##name: \
leal 4(%esp),%ecx; \
movl PT_ECX(%ecx),%edx; \
movl PT_EBX(%ecx),%eax; \
jmp sys_##name;
#define PTREGSCALL3(name) \
ALIGN; \
ptregs_##name: \
leal 4(%esp),%eax; \
pushl %eax; \
movl PT_EDX(%eax),%ecx; \
movl PT_ECX(%eax),%edx; \
movl PT_EBX(%eax),%eax; \
call sys_##name; \
addl $4,%esp; \
ret
PTREGSCALL0(iopl)
PTREGSCALL0(fork)
PTREGSCALL0(clone)
PTREGSCALL0(vfork)
PTREGSCALL0(execve)
PTREGSCALL0(sigaltstack)
PTREGSCALL0(sigreturn)
PTREGSCALL0(rt_sigreturn)
PTREGSCALL0(vm86)
PTREGSCALL0(vm86old)
.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