From: Andi Kleen <ak@suse.de>
To: discuss@x86-64.org
Cc: Jeff Dike <jdike@addtoit.com>,
linux-kernel@vger.kernel.org,
User-mode-linux-devel@lists.sourceforge.net,
Steven James <pyro@linuxlabs.com>,
Roland McGrath <roland@redhat.com>,
Blaisorblade <blaisorblade@yahoo.it>
Subject: Re: [discuss] [RFC] [PATCH] Double syscall exit traces on x86_64
Date: Fri, 26 May 2006 12:36:26 +0200 [thread overview]
Message-ID: <200605261236.26814.ak@suse.de> (raw)
In-Reply-To: <20060526032424.GA8283@ccure.user-mode-linux.org>
On Friday 26 May 2006 05:24, Jeff Dike wrote:
> We are seeing double ptrace notifications of system call returns on recent
> x86_64 kernels. This breaks UML and at least one other app.
I believe this patch is the correct fix. Can you confirm it works for you?
-Andi
Don't do syscall exit tracing twice
int_ret_from_syscall already does syscall exit tracing, so
no need to do it again in the caller.
This caused problems for UML and some other special programs doing
syscall interception.
Signed-off-by: Andi Kleen <ak@suse.de>
Index: linux/arch/x86_64/kernel/entry.S
===================================================================
--- linux.orig/arch/x86_64/kernel/entry.S
+++ linux/arch/x86_64/kernel/entry.S
@@ -282,12 +282,7 @@ tracesys:
ja 1f
movq %r10,%rcx /* fixup for C */
call *sys_call_table(,%rax,8)
- movq %rax,RAX-ARGOFFSET(%rsp)
-1: SAVE_REST
- movq %rsp,%rdi
- call syscall_trace_leave
- RESTORE_TOP_OF_STACK %rbx
- RESTORE_REST
+1: movq %rax,RAX-ARGOFFSET(%rsp)
/* Use IRET because user could have changed frame */
jmp int_ret_from_sys_call
CFI_ENDPROC
next prev parent reply other threads:[~2006-05-26 10:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-26 3:24 [RFC] [PATCH] Double syscall exit traces on x86_64 Jeff Dike
2006-05-26 10:36 ` Andi Kleen [this message]
2006-05-26 14:13 ` [discuss] " Jeff Dike
2006-06-01 19:07 ` [uml-devel] " Blaisorblade
2006-06-02 15:13 ` [uml-devel] " Jeff Dike
2006-06-02 15:38 ` Steven James
2006-06-02 17:16 ` Blaisorblade
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=200605261236.26814.ak@suse.de \
--to=ak@suse.de \
--cc=User-mode-linux-devel@lists.sourceforge.net \
--cc=blaisorblade@yahoo.it \
--cc=discuss@x86-64.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pyro@linuxlabs.com \
--cc=roland@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox