2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #include "linux/slab.h"
7 #include "linux/smp_lock.h"
8 #include "linux/ptrace.h"
9 #include "asm/ptrace.h"
10 #include "asm/pgtable.h"
11 #include "asm/tlbflush.h"
12 #include "asm/uaccess.h"
13 #include "user_util.h"
14 #include "kern_util.h"
20 #include "choose-mode.h"
21 #include "mode_kern.h"
23 void flush_thread(void)
25 arch_flush_thread(¤t->thread.arch);
26 CHOOSE_MODE(flush_thread_tt(), flush_thread_skas());
29 void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
31 CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp);
34 static long execve1(char *file, char __user * __user *argv,
35 char __user *__user *env)
40 log_exec(argv, current->tty);
42 error = do_execve(file, argv, env, ¤t->thread.regs);
45 current->ptrace &= ~PT_DTRACE;
47 set_cmdline(current_cmd());
52 long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
56 err = execve1(file, argv, env);
58 do_longjmp(current->thread.exec_buf, 1);
62 long sys_execve(char __user *file, char __user *__user *argv,
63 char __user *__user *env)
69 filename = getname(file);
70 error = PTR_ERR(filename);
71 if (IS_ERR(filename)) goto out;
72 error = execve1(filename, argv, env);