Loading arch/m32r/include/asm/ptrace.h +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ extern void withdraw_debug_trap(struct pt_regs *regs); #define task_pt_regs(task) \ ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE) - 1) #define current_pt_regs() ((struct pt_regs *) \ ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) #endif /* __KERNEL */ Loading arch/m32r/include/asm/unistd.h +1 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,7 @@ #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_SYS_EXECVE #define __IGNORE_lchown #define __IGNORE_setuid Loading arch/m32r/kernel/process.c +10 −36 Original line number Diff line number Diff line Loading @@ -216,12 +216,11 @@ int copy_thread(unsigned long clone_flags, unsigned long spu, return 0; } asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) asmlinkage int sys_fork(void) { #ifdef CONFIG_MMU return do_fork(SIGCHLD, regs.spu, ®s, 0, NULL, NULL); struct pt_regs *regs = current_pt_regs(); return do_fork(SIGCHLD, regs->spu, regs, 0, NULL, NULL); #else return -EINVAL; #endif /* CONFIG_MMU */ Loading @@ -229,14 +228,13 @@ asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2, asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, unsigned long parent_tidptr, unsigned long child_tidptr, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) unsigned long child_tidptr) { struct pt_regs *regs = current_pt_regs(); if (!newsp) newsp = regs.spu; newsp = regs->spu; return do_fork(clone_flags, newsp, ®s, 0, return do_fork(clone_flags, newsp, regs, 0, (int __user *)parent_tidptr, (int __user *)child_tidptr); } Loading @@ -250,37 +248,13 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, * do not have enough call-clobbered registers to hold all * the information you need. */ asmlinkage int sys_vfork(unsigned long r0, unsigned long r1, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) asmlinkage int sys_vfork(void) { return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.spu, ®s, 0, struct pt_regs *regs = current_pt_regs(); return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->spu, regs, 0, NULL, NULL); } /* * sys_execve() executes a new program. */ asmlinkage int sys_execve(const char __user *ufilename, const char __user *const __user *uargv, const char __user *const __user *uenvp, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) { int error; struct filename *filename; filename = getname(ufilename); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = do_execve(filename->name, uargv, uenvp, ®s); putname(filename); out: return error; } /* * These bracket the sleeping functions.. */ Loading Loading
arch/m32r/include/asm/ptrace.h +2 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ extern void withdraw_debug_trap(struct pt_regs *regs); #define task_pt_regs(task) \ ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE) - 1) #define current_pt_regs() ((struct pt_regs *) \ ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) #endif /* __KERNEL */ Loading
arch/m32r/include/asm/unistd.h +1 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,7 @@ #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_SYS_EXECVE #define __IGNORE_lchown #define __IGNORE_setuid Loading
arch/m32r/kernel/process.c +10 −36 Original line number Diff line number Diff line Loading @@ -216,12 +216,11 @@ int copy_thread(unsigned long clone_flags, unsigned long spu, return 0; } asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) asmlinkage int sys_fork(void) { #ifdef CONFIG_MMU return do_fork(SIGCHLD, regs.spu, ®s, 0, NULL, NULL); struct pt_regs *regs = current_pt_regs(); return do_fork(SIGCHLD, regs->spu, regs, 0, NULL, NULL); #else return -EINVAL; #endif /* CONFIG_MMU */ Loading @@ -229,14 +228,13 @@ asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2, asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, unsigned long parent_tidptr, unsigned long child_tidptr, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) unsigned long child_tidptr) { struct pt_regs *regs = current_pt_regs(); if (!newsp) newsp = regs.spu; newsp = regs->spu; return do_fork(clone_flags, newsp, ®s, 0, return do_fork(clone_flags, newsp, regs, 0, (int __user *)parent_tidptr, (int __user *)child_tidptr); } Loading @@ -250,37 +248,13 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, * do not have enough call-clobbered registers to hold all * the information you need. */ asmlinkage int sys_vfork(unsigned long r0, unsigned long r1, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) asmlinkage int sys_vfork(void) { return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.spu, ®s, 0, struct pt_regs *regs = current_pt_regs(); return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->spu, regs, 0, NULL, NULL); } /* * sys_execve() executes a new program. */ asmlinkage int sys_execve(const char __user *ufilename, const char __user *const __user *uargv, const char __user *const __user *uenvp, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs regs) { int error; struct filename *filename; filename = getname(ufilename); error = PTR_ERR(filename); if (IS_ERR(filename)) goto out; error = do_execve(filename->name, uargv, uenvp, ®s); putname(filename); out: return error; } /* * These bracket the sleeping functions.. */ Loading