[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-f19a25c872b20ae4357f72687cf3e7b0da220ee2@git.kernel.org>
Date: Wed, 27 Jan 2010 08:39:34 GMT
From: tip-bot for Brian Gerst <brgerst@...il.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
brgerst@...il.com, tglx@...utronix.de
Subject: [tip:x86/asm] x86-64: Use normal ptregs stub for execve
Commit-ID: f19a25c872b20ae4357f72687cf3e7b0da220ee2
Gitweb: http://git.kernel.org/tip/f19a25c872b20ae4357f72687cf3e7b0da220ee2
Author: Brian Gerst <brgerst@...il.com>
AuthorDate: Mon, 25 Jan 2010 10:47:33 -0500
Committer: H. Peter Anvin <hpa@...or.com>
CommitDate: Tue, 26 Jan 2010 23:38:14 -0800
x86-64: Use normal ptregs stub for execve
Execve historically passed regs by value, so it had a seperate stub.
This is no longer true, so change it to use a normal PTREGSCALL stub.
Signed-off-by: Brian Gerst <brgerst@...il.com>
LKML-Reference: <1264434453-2204-1-git-send-email-brgerst@...il.com>
Signed-off-by: H. Peter Anvin <hpa@...or.com>
---
arch/x86/kernel/entry_64.S | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 0697ff1..0c31502 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -696,6 +696,7 @@ END(\label)
PTREGSCALL stub_clone, sys_clone, %r8
PTREGSCALL stub_fork, sys_fork, %rdi
PTREGSCALL stub_vfork, sys_vfork, %rdi
+ PTREGSCALL stub_execve, sys_execve, %rcx
PTREGSCALL stub_sigaltstack, sys_sigaltstack, %rdx
PTREGSCALL stub_iopl, sys_iopl, %rsi
@@ -712,22 +713,6 @@ ENTRY(ptregscall_common)
CFI_ENDPROC
END(ptregscall_common)
-ENTRY(stub_execve)
- CFI_STARTPROC
- popq %r11
- CFI_ADJUST_CFA_OFFSET -8
- CFI_REGISTER rip, r11
- SAVE_REST
- FIXUP_TOP_OF_STACK %r11
- movq %rsp, %rcx
- call sys_execve
- RESTORE_TOP_OF_STACK %r11
- movq %rax,RAX(%rsp)
- RESTORE_REST
- jmp int_ret_from_sys_call
- CFI_ENDPROC
-END(stub_execve)
-
/*
* sigreturn is special because it needs to restore all registers on return.
* This cannot be done with SYSRET, so use the IRET return path instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists