parisc: switch to generic sys_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
4e5ed85ab5
commit
7f1f311ac7
|
@ -996,6 +996,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
|
|||
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
|
||||
#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
|
||||
#define __ARCH_WANT_KERNEL_EXECVE
|
||||
#define __ARCH_WANT_SYS_EXECVE
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
|
|
@ -1804,52 +1804,6 @@ ENTRY(sys_vfork_wrapper)
|
|||
ENDPROC(sys_vfork_wrapper)
|
||||
|
||||
|
||||
.macro execve_wrapper execve
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
|
||||
ldo TASK_REGS(%r1),%r1 /* get pt regs */
|
||||
|
||||
/*
|
||||
* Do we need to save/restore r3-r18 here?
|
||||
* I don't think so. why would new thread need old
|
||||
* threads registers?
|
||||
*/
|
||||
|
||||
/* %arg0 - %arg3 are already saved for us. */
|
||||
|
||||
STREG %r2,-RP_OFFSET(%r30)
|
||||
ldo FRAME_SIZE(%r30),%r30
|
||||
#ifdef CONFIG_64BIT
|
||||
ldo -16(%r30),%r29 /* Reference param save area */
|
||||
#endif
|
||||
BL \execve,%r2
|
||||
copy %r1,%arg0
|
||||
|
||||
ldo -FRAME_SIZE(%r30),%r30
|
||||
LDREG -RP_OFFSET(%r30),%r2
|
||||
|
||||
/* If exec succeeded we need to load the args */
|
||||
|
||||
ldo -1024(%r0),%r1
|
||||
cmpb,>>= %r28,%r1,error_\execve
|
||||
copy %r2,%r19
|
||||
|
||||
error_\execve:
|
||||
bv %r0(%r19)
|
||||
nop
|
||||
.endm
|
||||
|
||||
.import sys_execve
|
||||
ENTRY(sys_execve_wrapper)
|
||||
execve_wrapper sys_execve
|
||||
ENDPROC(sys_execve_wrapper)
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
.import sys32_execve
|
||||
ENTRY(sys32_execve_wrapper)
|
||||
execve_wrapper sys32_execve
|
||||
ENDPROC(sys32_execve_wrapper)
|
||||
#endif
|
||||
|
||||
ENTRY(sys_rt_sigreturn_wrapper)
|
||||
LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26
|
||||
ldo TASK_REGS(%r26),%r26 /* get pt regs */
|
||||
|
|
|
@ -314,29 +314,6 @@ unsigned long thread_saved_pc(struct task_struct *t)
|
|||
return t->thread.regs.kpc;
|
||||
}
|
||||
|
||||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
|
||||
asmlinkage int sys_execve(struct pt_regs *regs)
|
||||
{
|
||||
int error;
|
||||
struct filename *filename;
|
||||
|
||||
filename = getname((const char __user *) regs->gr[26]);
|
||||
error = PTR_ERR(filename);
|
||||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
error = do_execve(filename->name,
|
||||
(const char __user *const __user *) regs->gr[25],
|
||||
(const char __user *const __user *) regs->gr[24],
|
||||
regs);
|
||||
putname(filename);
|
||||
out:
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
get_wchan(struct task_struct *p)
|
||||
{
|
||||
|
|
|
@ -53,28 +53,6 @@
|
|||
#define DBG(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sys32_execve() executes a new program.
|
||||
*/
|
||||
|
||||
asmlinkage int sys32_execve(struct pt_regs *regs)
|
||||
{
|
||||
int error;
|
||||
struct filename *filename;
|
||||
|
||||
DBG(("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26]));
|
||||
filename = getname((const char __user *) regs->gr[26]);
|
||||
error = PTR_ERR(filename);
|
||||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
error = compat_do_execve(filename->name, compat_ptr(regs->gr[25]),
|
||||
compat_ptr(regs->gr[24]), regs);
|
||||
putname(filename);
|
||||
out:
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
|
||||
int r22, int r21, int r20)
|
||||
{
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
ENTRY_SAME(creat)
|
||||
ENTRY_SAME(link)
|
||||
ENTRY_SAME(unlink) /* 10 */
|
||||
ENTRY_DIFF(execve_wrapper)
|
||||
ENTRY_COMP(execve)
|
||||
ENTRY_SAME(chdir)
|
||||
/* See comments in kernel/time.c!!! Maybe we don't need this? */
|
||||
ENTRY_COMP(time)
|
||||
|
|
Loading…
Reference in New Issue