diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-12-09 19:01:53 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-12-09 19:28:34 -0500 |
commit | 11cf88bd0b8165b65aaabaee0977e9a3ad474ab7 (patch) | |
tree | 33e74a88baf24ee971282ded562b78db40749bb9 /arch/x86/kernel/process_32.c | |
parent | 27f59559d63375a4d59e7c720a439d9f0b47edad (diff) |
x86: Merge sys_execve
Change 32-bit sys_execve to PTREGSCALL3, and merge with 64-bit.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1260403316-5679-4-git-send-email-brgerst@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 075580b35682..486e38e2900b 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -451,31 +451,6 @@ int sys_clone(struct pt_regs *regs) | |||
451 | return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, child_tidptr); | 451 | return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, child_tidptr); |
452 | } | 452 | } |
453 | 453 | ||
454 | /* | ||
455 | * sys_execve() executes a new program. | ||
456 | */ | ||
457 | int sys_execve(struct pt_regs *regs) | ||
458 | { | ||
459 | int error; | ||
460 | char *filename; | ||
461 | |||
462 | filename = getname((char __user *) regs->bx); | ||
463 | error = PTR_ERR(filename); | ||
464 | if (IS_ERR(filename)) | ||
465 | goto out; | ||
466 | error = do_execve(filename, | ||
467 | (char __user * __user *) regs->cx, | ||
468 | (char __user * __user *) regs->dx, | ||
469 | regs); | ||
470 | if (error == 0) { | ||
471 | /* Make sure we don't return using sysenter.. */ | ||
472 | set_thread_flag(TIF_IRET); | ||
473 | } | ||
474 | putname(filename); | ||
475 | out: | ||
476 | return error; | ||
477 | } | ||
478 | |||
479 | #define top_esp (THREAD_SIZE - sizeof(unsigned long)) | 454 | #define top_esp (THREAD_SIZE - sizeof(unsigned long)) |
480 | #define top_ebp (THREAD_SIZE - 2*sizeof(unsigned long)) | 455 | #define top_ebp (THREAD_SIZE - 2*sizeof(unsigned long)) |
481 | 456 | ||