diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-12 14:38:28 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:24 -0500 |
commit | 49cb25e92902ba24bd38c350114f8695493b262f (patch) | |
tree | 4bc2fffe7aa654c4230232e0f64eee071ec1da46 | |
parent | 3fe26fa34da029263067b48836e740c1ddffbd91 (diff) |
x86: get rid of pt_regs argument in vm86/vm86old
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/x86/include/asm/syscalls.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 21 | ||||
-rw-r--r-- | arch/x86/kernel/vm86_32.c | 8 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 4 | ||||
-rw-r--r-- | arch/x86/um/sys_call_table_32.c | 3 |
5 files changed, 8 insertions, 32 deletions
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index de2e1ab913bb..f755423a5d02 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
@@ -40,8 +40,8 @@ asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, | |||
40 | unsigned long sys_sigreturn(void); | 40 | unsigned long sys_sigreturn(void); |
41 | 41 | ||
42 | /* kernel/vm86_32.c */ | 42 | /* kernel/vm86_32.c */ |
43 | int sys_vm86old(struct vm86_struct __user *, struct pt_regs *); | 43 | int sys_vm86old(struct vm86_struct __user *); |
44 | int sys_vm86(unsigned long, unsigned long, struct pt_regs *); | 44 | int sys_vm86(unsigned long, unsigned long); |
45 | 45 | ||
46 | #else /* CONFIG_X86_32 */ | 46 | #else /* CONFIG_X86_32 */ |
47 | 47 | ||
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index e132cf6ea140..352e5a9279ec 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -699,27 +699,6 @@ END(syscall_badsys) | |||
699 | */ | 699 | */ |
700 | .popsection | 700 | .popsection |
701 | 701 | ||
702 | /* | ||
703 | * System calls that need a pt_regs pointer. | ||
704 | */ | ||
705 | #define PTREGSCALL1(name) \ | ||
706 | ENTRY(ptregs_##name) ; \ | ||
707 | leal 4(%esp),%edx; \ | ||
708 | movl (PT_EBX+4)(%esp),%eax; \ | ||
709 | jmp sys_##name; \ | ||
710 | ENDPROC(ptregs_##name) | ||
711 | |||
712 | #define PTREGSCALL2(name) \ | ||
713 | ENTRY(ptregs_##name) ; \ | ||
714 | leal 4(%esp),%ecx; \ | ||
715 | movl (PT_ECX+4)(%esp),%edx; \ | ||
716 | movl (PT_EBX+4)(%esp),%eax; \ | ||
717 | jmp sys_##name; \ | ||
718 | ENDPROC(ptregs_##name) | ||
719 | |||
720 | PTREGSCALL2(vm86) | ||
721 | PTREGSCALL1(vm86old) | ||
722 | |||
723 | .macro FIXUP_ESPFIX_STACK | 702 | .macro FIXUP_ESPFIX_STACK |
724 | /* | 703 | /* |
725 | * Switch back for ESPFIX stack to the normal zerobased stack | 704 | * Switch back for ESPFIX stack to the normal zerobased stack |
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index 1dfe69cc78a8..1cf5766dde16 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c | |||
@@ -202,7 +202,7 @@ out: | |||
202 | static int do_vm86_irq_handling(int subfunction, int irqnumber); | 202 | static int do_vm86_irq_handling(int subfunction, int irqnumber); |
203 | static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk); | 203 | static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk); |
204 | 204 | ||
205 | int sys_vm86old(struct vm86_struct __user *v86, struct pt_regs *regs) | 205 | int sys_vm86old(struct vm86_struct __user *v86) |
206 | { | 206 | { |
207 | struct kernel_vm86_struct info; /* declare this _on top_, | 207 | struct kernel_vm86_struct info; /* declare this _on top_, |
208 | * this avoids wasting of stack space. | 208 | * this avoids wasting of stack space. |
@@ -222,7 +222,7 @@ int sys_vm86old(struct vm86_struct __user *v86, struct pt_regs *regs) | |||
222 | if (tmp) | 222 | if (tmp) |
223 | goto out; | 223 | goto out; |
224 | memset(&info.vm86plus, 0, (int)&info.regs32 - (int)&info.vm86plus); | 224 | memset(&info.vm86plus, 0, (int)&info.regs32 - (int)&info.vm86plus); |
225 | info.regs32 = regs; | 225 | info.regs32 = current_pt_regs(); |
226 | tsk->thread.vm86_info = v86; | 226 | tsk->thread.vm86_info = v86; |
227 | do_sys_vm86(&info, tsk); | 227 | do_sys_vm86(&info, tsk); |
228 | ret = 0; /* we never return here */ | 228 | ret = 0; /* we never return here */ |
@@ -231,7 +231,7 @@ out: | |||
231 | } | 231 | } |
232 | 232 | ||
233 | 233 | ||
234 | int sys_vm86(unsigned long cmd, unsigned long arg, struct pt_regs *regs) | 234 | int sys_vm86(unsigned long cmd, unsigned long arg) |
235 | { | 235 | { |
236 | struct kernel_vm86_struct info; /* declare this _on top_, | 236 | struct kernel_vm86_struct info; /* declare this _on top_, |
237 | * this avoids wasting of stack space. | 237 | * this avoids wasting of stack space. |
@@ -272,7 +272,7 @@ int sys_vm86(unsigned long cmd, unsigned long arg, struct pt_regs *regs) | |||
272 | ret = -EFAULT; | 272 | ret = -EFAULT; |
273 | if (tmp) | 273 | if (tmp) |
274 | goto out; | 274 | goto out; |
275 | info.regs32 = regs; | 275 | info.regs32 = current_pt_regs(); |
276 | info.vm86plus.is_vm86pus = 1; | 276 | info.vm86plus.is_vm86pus = 1; |
277 | tsk->thread.vm86_info = (struct vm86_struct __user *)v86; | 277 | tsk->thread.vm86_info = (struct vm86_struct __user *)v86; |
278 | do_sys_vm86(&info, tsk); | 278 | do_sys_vm86(&info, tsk); |
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 4e8ab081ee3d..250e2d990598 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
@@ -119,7 +119,7 @@ | |||
119 | 110 i386 iopl sys_iopl | 119 | 110 i386 iopl sys_iopl |
120 | 111 i386 vhangup sys_vhangup | 120 | 111 i386 vhangup sys_vhangup |
121 | 112 i386 idle | 121 | 112 i386 idle |
122 | 113 i386 vm86old ptregs_vm86old sys32_vm86_warning | 122 | 113 i386 vm86old sys_vm86old sys32_vm86_warning |
123 | 114 i386 wait4 sys_wait4 compat_sys_wait4 | 123 | 114 i386 wait4 sys_wait4 compat_sys_wait4 |
124 | 115 i386 swapoff sys_swapoff | 124 | 115 i386 swapoff sys_swapoff |
125 | 116 i386 sysinfo sys_sysinfo compat_sys_sysinfo | 125 | 116 i386 sysinfo sys_sysinfo compat_sys_sysinfo |
@@ -172,7 +172,7 @@ | |||
172 | 163 i386 mremap sys_mremap | 172 | 163 i386 mremap sys_mremap |
173 | 164 i386 setresuid sys_setresuid16 | 173 | 164 i386 setresuid sys_setresuid16 |
174 | 165 i386 getresuid sys_getresuid16 | 174 | 165 i386 getresuid sys_getresuid16 |
175 | 166 i386 vm86 ptregs_vm86 sys32_vm86_warning | 175 | 166 i386 vm86 sys_vm86 sys32_vm86_warning |
176 | 167 i386 query_module | 176 | 167 i386 query_module |
177 | 168 i386 poll sys_poll | 177 | 168 i386 poll sys_poll |
178 | 169 i386 nfsservctl | 178 | 169 i386 nfsservctl |
diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index 5cc2bcefb6ab..531d4269e2e3 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c | |||
@@ -24,9 +24,6 @@ | |||
24 | 24 | ||
25 | #define old_mmap sys_old_mmap | 25 | #define old_mmap sys_old_mmap |
26 | 26 | ||
27 | #define ptregs_vm86old sys_vm86old | ||
28 | #define ptregs_vm86 sys_vm86 | ||
29 | |||
30 | #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void sym(void) ; | 27 | #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void sym(void) ; |
31 | #include <asm/syscalls_32.h> | 28 | #include <asm/syscalls_32.h> |
32 | 29 | ||