From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
"David S. Miller" <davem@davemloft.net>,
Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [BUG kretprobes] kretprobe triggers General Protection Faults
Date: Tue, 25 Feb 2014 19:46:01 +0000 (UTC) [thread overview]
Message-ID: <1332921457.30140.1393357561516.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <1164803689.30103.1393357052243.JavaMail.zimbra@efficios.com>
Hi,
I had a bug report[1] from a user trying to add a kretprobe on the system
call entry code path:
arch/x86/kernel/entry_64.S:
ffffffff813dffe2 <system_call_fastpath+0x16>:
cmpl $__NR_syscall_max,%eax
#endif
ja badsys
movq %r10,%rcx
call *sys_call_table(,%rax,8) # XXX: rip relative
movq %rax,RAX-ARGOFFSET(%rsp) <--- return address pointing here
And all hell breaks loose (various types of faults, machine reboots,
applications exit randomly, etc.). I understand that this code path
is not marked as unsafe against kprobes, and I tested that a kprobes
indeed works fine there. However, kretprobes probably presumes a function
stack layout that is just not valid for the syscall entry routine.
Any thoughts on how kretprobes should handle this ?
Thanks,
Mathieu
[1] http://bugs.lttng.org/issues/687
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next parent reply other threads:[~2014-02-25 19:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1164803689.30103.1393357052243.JavaMail.zimbra@efficios.com>
2014-02-25 19:46 ` Mathieu Desnoyers [this message]
2014-02-26 2:48 ` [BUG kretprobes] kretprobe triggers General Protection Faults Masami Hiramatsu
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=1332921457.30140.1393357561516.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=rostedt@goodmis.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.