aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/exec_kern.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-07-10 07:45:13 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:24 -0400
commit1d3468a6643a6a5905e2ac9ae1fa1aefc06d882a (patch)
tree9f605490ab72b8027e9f5e0d4c9626516d8a73c5 /arch/um/kernel/exec_kern.c
parent469226a431f553a7b3ec17d87ce3c2d1c6c25fb2 (diff)
[PATCH] uml: move _kern.c files
Move most *_kern.c files in arch/um/kernel to *.c. This makes UML somewhat more closely resemble the other arches. [akpm@osdl.org: use the new INTF_* flags] Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/exec_kern.c')
-rw-r--r--arch/um/kernel/exec_kern.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/arch/um/kernel/exec_kern.c b/arch/um/kernel/exec_kern.c
deleted file mode 100644
index c0cb627bf594..000000000000
--- a/arch/um/kernel/exec_kern.c
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
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"
15#include "mem_user.h"
16#include "kern.h"
17#include "irq_user.h"
18#include "tlb.h"
19#include "os.h"
20#include "choose-mode.h"
21#include "mode_kern.h"
22
23void flush_thread(void)
24{
25 arch_flush_thread(&current->thread.arch);
26 CHOOSE_MODE(flush_thread_tt(), flush_thread_skas());
27}
28
29void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
30{
31 CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp);
32}
33
34static long execve1(char *file, char __user * __user *argv,
35 char __user *__user *env)
36{
37 long error;
38
39#ifdef CONFIG_TTY_LOG
40 log_exec(argv, current->tty);
41#endif
42 error = do_execve(file, argv, env, &current->thread.regs);
43 if (error == 0){
44 task_lock(current);
45 current->ptrace &= ~PT_DTRACE;
46 task_unlock(current);
47 set_cmdline(current_cmd());
48 }
49 return(error);
50}
51
52long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
53{
54 long err;
55
56 err = execve1(file, argv, env);
57 if(!err)
58 do_longjmp(current->thread.exec_buf, 1);
59 return(err);
60}
61
62long sys_execve(char __user *file, char __user *__user *argv,
63 char __user *__user *env)
64{
65 long error;
66 char *filename;
67
68 lock_kernel();
69 filename = getname(file);
70 error = PTR_ERR(filename);
71 if (IS_ERR(filename)) goto out;
72 error = execve1(filename, argv, env);
73 putname(filename);
74 out:
75 unlock_kernel();
76 return(error);
77}