aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/syscalls.h
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-02-10 09:51:46 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-11 06:40:45 -0500
commit253f29a4ae9cc6cdc7b94f96517f27a93885a6ce (patch)
tree09942e565938a6bac216b1725ccf607e01d09b20 /arch/x86/include/asm/syscalls.h
parentaa78bcfa01dec3cdbde3cda098ce32abbd9c3bf6 (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.h25
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 */
32asmlinkage int sys_fork(struct pt_regs); 32ptregscall int sys_fork(struct pt_regs *);
33asmlinkage int sys_clone(struct pt_regs); 33ptregscall int sys_clone(struct pt_regs *, unsigned long,
34asmlinkage int sys_vfork(struct pt_regs); 34 unsigned long, int __user *,
35asmlinkage int sys_execve(struct pt_regs); 35 unsigned long, int __user *);
36ptregscall int sys_vfork(struct pt_regs *);
37ptregscall 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 */
38asmlinkage int sys_sigsuspend(int, int, old_sigset_t); 42asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
39asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, 43asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
40 struct old_sigaction __user *); 44 struct old_sigaction __user *);
41asmlinkage int sys_sigaltstack(unsigned long); 45ptregscall int sys_sigaltstack(struct pt_regs *, const stack_t __user *,
42asmlinkage unsigned long sys_sigreturn(unsigned long); 46 stack_t __user *);
43asmlinkage int sys_rt_sigreturn(unsigned long); 47ptregscall unsigned long sys_sigreturn(struct pt_regs *);
48ptregscall int sys_rt_sigreturn(struct pt_regs *);
44 49
45/* kernel/ioport.c */ 50/* kernel/ioport.c */
46asmlinkage long sys_iopl(unsigned long); 51ptregscall long sys_iopl(struct pt_regs *, unsigned int);
47 52
48/* kernel/sys_i386_32.c */ 53/* kernel/sys_i386_32.c */
49asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, 54asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
@@ -59,8 +64,8 @@ struct oldold_utsname;
59asmlinkage int sys_olduname(struct oldold_utsname __user *); 64asmlinkage int sys_olduname(struct oldold_utsname __user *);
60 65
61/* kernel/vm86_32.c */ 66/* kernel/vm86_32.c */
62asmlinkage int sys_vm86old(struct pt_regs); 67ptregscall int sys_vm86old(struct pt_regs *, struct vm86_struct __user *);
63asmlinkage int sys_vm86(struct pt_regs); 68ptregscall int sys_vm86(struct pt_regs *, unsigned long, unsigned long);
64 69
65#else /* CONFIG_X86_32 */ 70#else /* CONFIG_X86_32 */
66 71