summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-10 22:44:54 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-01 04:53:31 +0200
commit7076aada1040de4ed79a5977dbabdb5e5ea5e249 (patch)
treedfcf480d21cd714a1cc42f38417c427d06526f5a /arch/x86/kernel/process.c
parentalpha: introduce ret_from_kernel_execve(), switch to generic kernel_execve() (diff)
downloadlinux-7076aada1040de4ed79a5977dbabdb5e5ea5e249.tar.xz
linux-7076aada1040de4ed79a5977dbabdb5e5ea5e249.zip
x86: split ret_from_fork
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r--arch/x86/kernel/process.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 7162e9c1f598..6947ec968bf8 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -299,44 +299,6 @@ sys_clone(unsigned long clone_flags, unsigned long newsp,
}
/*
- * This gets run with %si containing the
- * function to call, and %di containing
- * the "args".
- */
-extern void kernel_thread_helper(void);
-
-/*
- * Create a kernel thread
- */
-int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
-{
- struct pt_regs regs;
-
- memset(&regs, 0, sizeof(regs));
-
- regs.si = (unsigned long) fn;
- regs.di = (unsigned long) arg;
-
-#ifdef CONFIG_X86_32
- regs.ds = __USER_DS;
- regs.es = __USER_DS;
- regs.fs = __KERNEL_PERCPU;
- regs.gs = __KERNEL_STACK_CANARY;
-#else
- regs.ss = __KERNEL_DS;
-#endif
-
- regs.orig_ax = -1;
- regs.ip = (unsigned long) kernel_thread_helper;
- regs.cs = __KERNEL_CS | get_kernel_rpl();
- regs.flags = X86_EFLAGS_IF | X86_EFLAGS_BIT1;
-
- /* Ok, create the new process.. */
- return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
-}
-EXPORT_SYMBOL(kernel_thread);
-
-/*
* sys_execve() executes a new program.
*/
long sys_execve(const char __user *name,