um: take cleaning singlestep to start_thread()

... assuming it's needed to be done at all

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2012-09-03 03:24:18 -04:00 committed by Richard Weinberger
parent 5e19997a74
commit 424597921a
1 changed files with 6 additions and 20 deletions

View File

@ -41,32 +41,18 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
{ {
PT_REGS_IP(regs) = eip; PT_REGS_IP(regs) = eip;
PT_REGS_SP(regs) = esp; PT_REGS_SP(regs) = esp;
current->ptrace &= ~PT_DTRACE;
#ifdef SUBARCH_EXECVE1
SUBARCH_EXECVE1(regs->regs);
#endif
} }
EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(start_thread);
static long execve1(const char *file,
const char __user *const __user *argv,
const char __user *const __user *env)
{
long error;
error = do_execve(file, argv, env, &current->thread.regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
#ifdef SUBARCH_EXECVE1
SUBARCH_EXECVE1(&current->thread.regs.regs);
#endif
task_unlock(current);
}
return error;
}
long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env) long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env)
{ {
long err; long err;
err = execve1(file, argv, env); err = do_execve(file, argv, env, &current->thread.regs);
if (!err) if (!err)
UML_LONGJMP(current->thread.exec_buf, 1); UML_LONGJMP(current->thread.exec_buf, 1);
return err; return err;
@ -81,7 +67,7 @@ long sys_execve(const char __user *file, const char __user *const __user *argv,
filename = getname(file); filename = getname(file);
error = PTR_ERR(filename); error = PTR_ERR(filename);
if (IS_ERR(filename)) goto out; if (IS_ERR(filename)) goto out;
error = execve1(filename, argv, env); error = do_execve(filename, argv, env, &current->thread.regs);
putname(filename); putname(filename);
out: out:
return error; return error;