diff options
| -rw-r--r-- | arch/x86/kernel/entry_32.S | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 50b9c220e121..34dbfa909dd7 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
| @@ -725,22 +725,49 @@ END(syscall_badsys) | |||
| 725 | /* | 725 | /* |
| 726 | * System calls that need a pt_regs pointer. | 726 | * System calls that need a pt_regs pointer. |
| 727 | */ | 727 | */ |
| 728 | #define PTREGSCALL(name) \ | 728 | #define PTREGSCALL0(name) \ |
| 729 | ALIGN; \ | 729 | ALIGN; \ |
| 730 | ptregs_##name: \ | 730 | ptregs_##name: \ |
| 731 | leal 4(%esp),%eax; \ | 731 | leal 4(%esp),%eax; \ |
| 732 | jmp sys_##name; | 732 | jmp sys_##name; |
| 733 | 733 | ||
| 734 | PTREGSCALL(iopl) | 734 | #define PTREGSCALL1(name) \ |
| 735 | PTREGSCALL(fork) | 735 | ALIGN; \ |
| 736 | PTREGSCALL(clone) | 736 | ptregs_##name: \ |
| 737 | PTREGSCALL(vfork) | 737 | leal 4(%esp),%edx; \ |
| 738 | PTREGSCALL(execve) | 738 | movl PT_EBX(%edx),%eax; \ |
| 739 | PTREGSCALL(sigaltstack) | 739 | jmp sys_##name; |
| 740 | PTREGSCALL(sigreturn) | 740 | |
| 741 | PTREGSCALL(rt_sigreturn) | 741 | #define PTREGSCALL2(name) \ |
| 742 | PTREGSCALL(vm86) | 742 | ALIGN; \ |
| 743 | PTREGSCALL(vm86old) | 743 | ptregs_##name: \ |
| 744 | leal 4(%esp),%ecx; \ | ||
| 745 | movl PT_ECX(%ecx),%edx; \ | ||
| 746 | movl PT_EBX(%ecx),%eax; \ | ||
| 747 | jmp sys_##name; | ||
| 748 | |||
| 749 | #define PTREGSCALL3(name) \ | ||
| 750 | ALIGN; \ | ||
| 751 | ptregs_##name: \ | ||
| 752 | leal 4(%esp),%eax; \ | ||
| 753 | pushl %eax; \ | ||
| 754 | movl PT_EDX(%eax),%ecx; \ | ||
| 755 | movl PT_ECX(%eax),%edx; \ | ||
| 756 | movl PT_EBX(%eax),%eax; \ | ||
| 757 | call sys_##name; \ | ||
| 758 | addl $4,%esp; \ | ||
| 759 | ret | ||
| 760 | |||
| 761 | PTREGSCALL0(iopl) | ||
| 762 | PTREGSCALL0(fork) | ||
| 763 | PTREGSCALL0(clone) | ||
| 764 | PTREGSCALL0(vfork) | ||
| 765 | PTREGSCALL0(execve) | ||
| 766 | PTREGSCALL0(sigaltstack) | ||
| 767 | PTREGSCALL0(sigreturn) | ||
| 768 | PTREGSCALL0(rt_sigreturn) | ||
| 769 | PTREGSCALL0(vm86) | ||
| 770 | PTREGSCALL0(vm86old) | ||
| 744 | 771 | ||
| 745 | .macro FIXUP_ESPFIX_STACK | 772 | .macro FIXUP_ESPFIX_STACK |
| 746 | /* | 773 | /* |
