diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-31 15:48:05 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-30 23:35:51 -0400 |
commit | be6abfa769fa07ce89ac73273360b335ae978805 (patch) | |
tree | e6b9ba23767a93839c5e4e14f197d4781bf95cf4 /arch/powerpc/include | |
parent | 58254e1002a82eb383c5977ad9fd5a451b91fe29 (diff) |
powerpc: switch to generic sys_execve()/kernel_execve()
the only non-obvious part is that current_pt_regs() is really needed
here - task_pt_regs() is NULL for kernel threads; it's OK for ptrace
uses (the thing task_pt_regs() is intended for), but not for us.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/syscalls.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/unistd.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 9c21ed42aba6..f76b88c367d1 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h | |||
@@ -125,6 +125,8 @@ extern unsigned long ptrace_get_reg(struct task_struct *task, int regno); | |||
125 | extern int ptrace_put_reg(struct task_struct *task, int regno, | 125 | extern int ptrace_put_reg(struct task_struct *task, int regno, |
126 | unsigned long data); | 126 | unsigned long data); |
127 | 127 | ||
128 | #define current_pt_regs() \ | ||
129 | ((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1) | ||
128 | /* | 130 | /* |
129 | * We use the least-significant bit of the trap field to indicate | 131 | * We use the least-significant bit of the trap field to indicate |
130 | * whether we have saved the full set of registers, or only a | 132 | * whether we have saved the full set of registers, or only a |
diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h index 4084e567d28e..329db4ec12ca 100644 --- a/arch/powerpc/include/asm/syscalls.h +++ b/arch/powerpc/include/asm/syscalls.h | |||
@@ -17,9 +17,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, | |||
17 | asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len, | 17 | asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len, |
18 | unsigned long prot, unsigned long flags, | 18 | unsigned long prot, unsigned long flags, |
19 | unsigned long fd, unsigned long pgoff); | 19 | unsigned long fd, unsigned long pgoff); |
20 | asmlinkage int sys_execve(unsigned long a0, unsigned long a1, | ||
21 | unsigned long a2, unsigned long a3, unsigned long a4, | ||
22 | unsigned long a5, struct pt_regs *regs); | ||
23 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long usp, | 20 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long usp, |
24 | int __user *parent_tidp, void __user *child_threadptr, | 21 | int __user *parent_tidp, void __user *child_threadptr, |
25 | int __user *child_tidp, int p6, struct pt_regs *regs); | 22 | int __user *child_tidp, int p6, struct pt_regs *regs); |
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index bd377a368611..26a6825909b6 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
@@ -420,6 +420,8 @@ | |||
420 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 420 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
421 | #define __ARCH_WANT_SYS_NEWFSTATAT | 421 | #define __ARCH_WANT_SYS_NEWFSTATAT |
422 | #endif | 422 | #endif |
423 | #define __ARCH_WANT_SYS_EXECVE | ||
424 | #define __ARCH_WANT_KERNEL_EXECVE | ||
423 | 425 | ||
424 | /* | 426 | /* |
425 | * "Conditional" syscalls | 427 | * "Conditional" syscalls |