select GENERIC_CMOS_UPDATE
select MODULES_USE_ELF_RELA
select GENERIC_KERNEL_THREAD
+ select GENERIC_KERNEL_EXECVE
config HZ
int
jsr schedule_tail
move.d $r2, $r10 ; argument is here
jsr $r1 ; call the payload
- moveq 0, $r10
- jsr sys_exit ; never returns
+ moveq 0, $r9 ; no syscall restarts, TYVM...
+ ba ret_from_sys_call
ret_from_intr:
;; check for resched if preemptive kernel or if we're going back to user-mode
ba do_sigtrap ; SIGTRAP the offending process.
pop $dccr ; Restore dccr in delay slot.
- .global kernel_execve
-kernel_execve:
- move.d __NR_execve, $r9
- break 13
- ret
- nop
-
.data
hw_bp_trigs:
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), current_pt_regs(), 0, NULL, NULL);
}
-/*
- * sys_execve() executes a new program.
- */
-asmlinkage int sys_execve(const char *fname,
- const char *const *argv,
- const char *const *envp,
- long r13, long mof, long srp,
- struct pt_regs *regs)
-{
- int error;
- struct filename *filename;
-
- filename = getname(fname);
- error = PTR_ERR(filename);
-
- if (IS_ERR(filename))
- goto out;
- error = do_execve(filename->name, argv, envp, regs);
- putname(filename);
- out:
- return error;
-}
-
unsigned long get_wchan(struct task_struct *p)
{
#if 0
move.d $r2, $r10
jsr $r1
nop
- moveq 0, $r10
- jsr sys_exit
+ moveq 0, $r9 ; no syscall restarts, TYVM...
+ ba ret_from_sys_call
nop
.size ret_from_kernel_thread, . - ret_from_kernel_thread
ba do_sigtrap ; SIGTRAP the offending process.
move.d [$sp+], $r0 ; Restore R0 in delay slot.
- .global kernel_execve
- .type kernel_execve,@function
-kernel_execve:
- move.d __NR_execve, $r9
- break 13
- ret
- nop
- .size kernel_execve, . - kernel_execve
-
.data
.section .rodata,"a"
return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), current_pt_regs(), 0, NULL, NULL);
}
-/* sys_execve() executes a new program. */
-asmlinkage int
-sys_execve(const char *fname,
- const char *const *argv,
- const char *const *envp, long r13, long mof, long srp,
- struct pt_regs *regs)
-{
- int error;
- struct filename *filename;
-
- filename = getname(fname);
- error = PTR_ERR(filename);
-
- if (IS_ERR(filename))
- goto out;
-
- error = do_execve(filename->name, argv, envp, regs);
- putname(filename);
- out:
- return error;
-}
-
unsigned long
get_wchan(struct task_struct *p)
{
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
+#define __ARCH_WANT_SYS_EXECVE
/*
* "Conditional" syscalls