aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/syscalls.h
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-02-11 16:43:58 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2009-02-11 17:00:56 -0500
commitb12bdaf11f935d7be030207e3c77faeaeab8ded3 (patch)
treee41f325f01614f7cf2eb78350fbd7440afe39cf8 /arch/x86/include/asm/syscalls.h
parent1c0040047d5499599cc231ca3f105be3ceff8562 (diff)
x86: use regparm(3) for passed-in pt_regs pointer
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 take the pointer as an argument instead of relying on the assumption that the pt_regs structure overlaps the function arguments. Drop the use of regparm(1) due to concern about gcc bugs, and to move in the direction of the eventual removal of regparm(0) for asmlinkage. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/syscalls.h')
-rw-r--r--arch/x86/include/asm/syscalls.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h
index 617295255a17..77bb31a88ba8 100644
--- a/arch/x86/include/asm/syscalls.h
+++ b/arch/x86/include/asm/syscalls.h
@@ -29,26 +29,21 @@ 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 */
32ptregscall int sys_fork(struct pt_regs *); 32int sys_fork(struct pt_regs *);
33ptregscall int sys_clone(struct pt_regs *, unsigned long, 33int sys_clone(struct pt_regs *);
34 unsigned long, int __user *, 34int sys_vfork(struct pt_regs *);
35 unsigned long, int __user *); 35int sys_execve(struct pt_regs *);
36ptregscall int sys_vfork(struct pt_regs *);
37ptregscall int sys_execve(struct pt_regs *, char __user *,
38 char __user * __user *,
39 char __user * __user *);
40 36
41/* kernel/signal_32.c */ 37/* kernel/signal_32.c */
42asmlinkage int sys_sigsuspend(int, int, old_sigset_t); 38asmlinkage int sys_sigsuspend(int, int, old_sigset_t);
43asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, 39asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
44 struct old_sigaction __user *); 40 struct old_sigaction __user *);
45ptregscall int sys_sigaltstack(struct pt_regs *, const stack_t __user *, 41int sys_sigaltstack(struct pt_regs *);
46 stack_t __user *); 42unsigned long sys_sigreturn(struct pt_regs *);
47ptregscall unsigned long sys_sigreturn(struct pt_regs *); 43int sys_rt_sigreturn(struct pt_regs *);
48ptregscall int sys_rt_sigreturn(struct pt_regs *);
49 44
50/* kernel/ioport.c */ 45/* kernel/ioport.c */
51ptregscall long sys_iopl(struct pt_regs *, unsigned int); 46long sys_iopl(struct pt_regs *);
52 47
53/* kernel/sys_i386_32.c */ 48/* kernel/sys_i386_32.c */
54asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, 49asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long,
@@ -64,8 +59,8 @@ struct oldold_utsname;
64asmlinkage int sys_olduname(struct oldold_utsname __user *); 59asmlinkage int sys_olduname(struct oldold_utsname __user *);
65 60
66/* kernel/vm86_32.c */ 61/* kernel/vm86_32.c */
67ptregscall int sys_vm86old(struct pt_regs *, struct vm86_struct __user *); 62int sys_vm86old(struct pt_regs *);
68ptregscall int sys_vm86(struct pt_regs *, unsigned long, unsigned long); 63int sys_vm86(struct pt_regs *);
69 64
70#else /* CONFIG_X86_32 */ 65#else /* CONFIG_X86_32 */
71 66