From: Brian Gerst <brgerst@gmail.com>
To: hpa@zytor.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86-64: Use normal ptregs stub for execve
Date: Mon, 25 Jan 2010 10:47:33 -0500 [thread overview]
Message-ID: <1264434453-2204-1-git-send-email-brgerst@gmail.com> (raw)
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@gmail.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.
--
1.6.6
next reply other threads:[~2010-01-25 15:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 15:47 Brian Gerst [this message]
2010-01-27 8:39 ` [tip:x86/asm] x86-64: Use normal ptregs stub for execve tip-bot for Brian Gerst
2010-01-27 13:07 ` Ingo Molnar
2010-01-27 15:21 ` Brian Gerst
2010-01-27 16:28 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1264434453-2204-1-git-send-email-brgerst@gmail.com \
--to=brgerst@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.