diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-02-10 09:51:46 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-11 06:40:45 -0500 |
commit | 253f29a4ae9cc6cdc7b94f96517f27a93885a6ce (patch) | |
tree | 09942e565938a6bac216b1725ccf607e01d09b20 /arch/x86/include/asm/syscalls.h | |
parent | aa78bcfa01dec3cdbde3cda098ce32abbd9c3bf6 (diff) |
x86: pass in pt_regs pointer for syscalls that need it
Some syscalls need to access the pt_regs structure, either to copy
user register state or to modifiy it. This patch adds stubs to load
the address of the pt_regs struct into the %eax register, and changes
the syscalls to regparm(1) to receive the pt_regs pointer as the
first argument.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/syscalls.h')
-rw-r--r-- | arch/x86/include/asm/syscalls.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index c0b0bda754ee..617295255a17 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
@@ -29,21 +29,26 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *); | |||
29 | /* X86_32 only */ | 29 | /* X86_32 only */ |
30 | #ifdef CONFIG_X86_32 | 30 | #ifdef CONFIG_X86_32 |
31 | /* kernel/process_32.c */ | 31 | /* kernel/process_32.c */ |
32 | asmlinkage int sys_fork(struct pt_regs); | 32 | ptregscall int sys_fork(struct pt_regs *); |
33 | asmlinkage int sys_clone(struct pt_regs); | 33 | ptregscall int sys_clone(struct pt_regs *, unsigned long, |
34 | asmlinkage int sys_vfork(struct pt_regs); | 34 | unsigned long, int __user *, |
35 | asmlinkage int sys_execve(struct pt_regs); | 35 | unsigned long, int __user *); |
36 | ptregscall int sys_vfork(struct pt_regs *); | ||
37 | ptregscall int sys_execve(struct pt_regs *, char __user *, | ||
38 | char __user * __user *, | ||
39 | char __user * __user *); | ||
36 | 40 | ||
37 | /* kernel/signal_32.c */ | 41 | /* kernel/signal_32.c */ |
38 | asmlinkage int sys_sigsuspend(int, int, old_sigset_t); | 42 | asmlinkage int sys_sigsuspend(int, int, old_sigset_t); |
39 | asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, | 43 | asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, |
40 | struct old_sigaction __user *); | 44 | struct old_sigaction __user *); |
41 | asmlinkage int sys_sigaltstack(unsigned long); | 45 | ptregscall int sys_sigaltstack(struct pt_regs *, const stack_t __user *, |
42 | asmlinkage unsigned long sys_sigreturn(unsigned long); | 46 | stack_t __user *); |
43 | asmlinkage int sys_rt_sigreturn(unsigned long); | 47 | ptregscall unsigned long sys_sigreturn(struct pt_regs *); |
48 | ptregscall int sys_rt_sigreturn(struct pt_regs *); | ||
44 | 49 | ||
45 | /* kernel/ioport.c */ | 50 | /* kernel/ioport.c */ |
46 | asmlinkage long sys_iopl(unsigned long); | 51 | ptregscall long sys_iopl(struct pt_regs *, unsigned int); |
47 | 52 | ||
48 | /* kernel/sys_i386_32.c */ | 53 | /* kernel/sys_i386_32.c */ |
49 | asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, | 54 | asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, |
@@ -59,8 +64,8 @@ struct oldold_utsname; | |||
59 | asmlinkage int sys_olduname(struct oldold_utsname __user *); | 64 | asmlinkage int sys_olduname(struct oldold_utsname __user *); |
60 | 65 | ||
61 | /* kernel/vm86_32.c */ | 66 | /* kernel/vm86_32.c */ |
62 | asmlinkage int sys_vm86old(struct pt_regs); | 67 | ptregscall int sys_vm86old(struct pt_regs *, struct vm86_struct __user *); |
63 | asmlinkage int sys_vm86(struct pt_regs); | 68 | ptregscall int sys_vm86(struct pt_regs *, unsigned long, unsigned long); |
64 | 69 | ||
65 | #else /* CONFIG_X86_32 */ | 70 | #else /* CONFIG_X86_32 */ |
66 | 71 | ||