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"
10 #include "asm/ptrace.h"
11 #include "asm/pgtable.h"
12 #include "asm/tlbflush.h"
13 #include "asm/uaccess.h"
14 #include "kern_util.h"
15 #include "as-layout.h"
21 #include "mode_kern.h"
23 void flush_thread(void)
25 arch_flush_thread(¤t->thread.arch);
29 void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
31 start_thread_skas(regs, eip, esp);
35 extern void log_exec(char **argv, void *tty);
38 static long execve1(char *file, char __user * __user *argv,
39 char __user *__user *env)
43 struct tty_struct *tty;
45 mutex_lock(&tty_mutex);
46 tty = get_current_tty();
49 mutex_unlock(&tty_mutex);
51 error = do_execve(file, argv, env, ¤t->thread.regs);
54 current->ptrace &= ~PT_DTRACE;
55 #ifdef SUBARCH_EXECVE1
56 SUBARCH_EXECVE1(¤t->thread.regs.regs);
63 long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
67 err = execve1(file, argv, env);
69 do_longjmp(current->thread.exec_buf, 1);
73 long sys_execve(char __user *file, char __user *__user *argv,
74 char __user *__user *env)
80 filename = getname(file);
81 error = PTR_ERR(filename);
82 if (IS_ERR(filename)) goto out;
83 error = execve1(filename, argv, env);