Loading arch/sparc/include/asm/syscalls.h +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ extern asmlinkage long sparc_do_fork(unsigned long clone_flags, struct pt_regs *regs, unsigned long stack_size); #ifndef __arch64__ extern asmlinkage int sparc_execve(struct pt_regs *regs); #endif #endif /* _SPARC64_SYSCALLS_H */ arch/sparc/include/asm/unistd.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ #define __ARCH_WANT_COMPAT_SYS_TIME #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_COMPAT_SYS_SENDFILE #define __ARCH_WANT_SYS_EXECVE #endif /* Loading arch/sparc/kernel/process_64.c +0 −29 Original line number Diff line number Diff line Loading @@ -667,35 +667,6 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs) } EXPORT_SYMBOL(dump_fpu); /* * sparc_execve() executes a new program after the asm stub has set * things up for us. This should basically do what I want it to. */ asmlinkage int sparc_execve(struct pt_regs *regs) { int error, base = 0; struct filename *filename; /* User register window flush is done by entry.S */ /* Check for indirect call. */ if (regs->u_regs[UREG_G1] == 0) base = 1; filename = getname((char __user *)regs->u_regs[base + UREG_I0]); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = do_execve(filename->name, (const char __user *const __user *) regs->u_regs[base + UREG_I1], (const char __user *const __user *) regs->u_regs[base + UREG_I2], regs); putname(filename); out: return error; } unsigned long get_wchan(struct task_struct *task) { unsigned long pc, fp, bias = 0; Loading arch/sparc/kernel/sys_sparc32.c +0 −29 Original line number Diff line number Diff line Loading @@ -396,35 +396,6 @@ asmlinkage long compat_sys_rt_sigaction(int sig, return ret; } /* * sparc32_execve() executes a new program after the asm stub has set * things up for us. This should basically do what I want it to. */ asmlinkage long sparc32_execve(struct pt_regs *regs) { int error, base = 0; struct filename *filename; /* User register window flush is done by entry.S */ /* Check for indirect call. */ if ((u32)regs->u_regs[UREG_G1] == 0) base = 1; filename = getname(compat_ptr(regs->u_regs[base + UREG_I0])); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = compat_do_execve(filename->name, compat_ptr(regs->u_regs[base + UREG_I1]), compat_ptr(regs->u_regs[base + UREG_I2]), regs); putname(filename); out: return error; } #ifdef CONFIG_MODULES asmlinkage long sys32_init_module(void __user *umod, u32 len, Loading arch/sparc/kernel/syscalls.S +8 −12 Original line number Diff line number Diff line /* SunOS's execv() call only specifies the argv argument, the * environment settings are the same as the calling processes. */ sys_execve: sethi %hi(sparc_execve), %g1 ba,pt %xcc, execve_merge or %g1, %lo(sparc_execve), %g1 sys64_execve: set sys_execve, %g1 jmpl %g1, %g0 flushw #ifdef CONFIG_COMPAT sunos_execv: stx %g0, [%sp + PTREGS_OFF + PT_V9_I2] mov %g0, %o2 sys32_execve: sethi %hi(sparc32_execve), %g1 or %g1, %lo(sparc32_execve), %g1 #endif execve_merge: flushw set compat_sys_execve, %g1 jmpl %g1, %g0 add %sp, PTREGS_OFF, %o0 flushw #endif .align 32 sys_sparc_pipe: Loading Loading
arch/sparc/include/asm/syscalls.h +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ extern asmlinkage long sparc_do_fork(unsigned long clone_flags, struct pt_regs *regs, unsigned long stack_size); #ifndef __arch64__ extern asmlinkage int sparc_execve(struct pt_regs *regs); #endif #endif /* _SPARC64_SYSCALLS_H */
arch/sparc/include/asm/unistd.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ #define __ARCH_WANT_COMPAT_SYS_TIME #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_COMPAT_SYS_SENDFILE #define __ARCH_WANT_SYS_EXECVE #endif /* Loading
arch/sparc/kernel/process_64.c +0 −29 Original line number Diff line number Diff line Loading @@ -667,35 +667,6 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs) } EXPORT_SYMBOL(dump_fpu); /* * sparc_execve() executes a new program after the asm stub has set * things up for us. This should basically do what I want it to. */ asmlinkage int sparc_execve(struct pt_regs *regs) { int error, base = 0; struct filename *filename; /* User register window flush is done by entry.S */ /* Check for indirect call. */ if (regs->u_regs[UREG_G1] == 0) base = 1; filename = getname((char __user *)regs->u_regs[base + UREG_I0]); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = do_execve(filename->name, (const char __user *const __user *) regs->u_regs[base + UREG_I1], (const char __user *const __user *) regs->u_regs[base + UREG_I2], regs); putname(filename); out: return error; } unsigned long get_wchan(struct task_struct *task) { unsigned long pc, fp, bias = 0; Loading
arch/sparc/kernel/sys_sparc32.c +0 −29 Original line number Diff line number Diff line Loading @@ -396,35 +396,6 @@ asmlinkage long compat_sys_rt_sigaction(int sig, return ret; } /* * sparc32_execve() executes a new program after the asm stub has set * things up for us. This should basically do what I want it to. */ asmlinkage long sparc32_execve(struct pt_regs *regs) { int error, base = 0; struct filename *filename; /* User register window flush is done by entry.S */ /* Check for indirect call. */ if ((u32)regs->u_regs[UREG_G1] == 0) base = 1; filename = getname(compat_ptr(regs->u_regs[base + UREG_I0])); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = compat_do_execve(filename->name, compat_ptr(regs->u_regs[base + UREG_I1]), compat_ptr(regs->u_regs[base + UREG_I2]), regs); putname(filename); out: return error; } #ifdef CONFIG_MODULES asmlinkage long sys32_init_module(void __user *umod, u32 len, Loading
arch/sparc/kernel/syscalls.S +8 −12 Original line number Diff line number Diff line /* SunOS's execv() call only specifies the argv argument, the * environment settings are the same as the calling processes. */ sys_execve: sethi %hi(sparc_execve), %g1 ba,pt %xcc, execve_merge or %g1, %lo(sparc_execve), %g1 sys64_execve: set sys_execve, %g1 jmpl %g1, %g0 flushw #ifdef CONFIG_COMPAT sunos_execv: stx %g0, [%sp + PTREGS_OFF + PT_V9_I2] mov %g0, %o2 sys32_execve: sethi %hi(sparc32_execve), %g1 or %g1, %lo(sparc32_execve), %g1 #endif execve_merge: flushw set compat_sys_execve, %g1 jmpl %g1, %g0 add %sp, PTREGS_OFF, %o0 flushw #endif .align 32 sys_sparc_pipe: Loading