From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Subject: [PATCH ftrace/core 0/2] ftrace, kprobes: Introduce IPMODIFY flag for ftrace_ops to detect conflicts
Date: Tue, 10 Jun 2014 10:50:01 +0000 [thread overview]
Message-ID: <20140610105001.8732.93502.stgit@kbuild-fedora.novalocal> (raw)
Hi,
Here is a pair of patches which introduces IPMODIFY flag for
ftrace_ops to detect conflicts of ftrace users who can modify
regs->ip in their handler.
Currently, only kprobes can change the regs->ip in the handler,
but recently kpatch is also want to change it. Moreover, since
the ftrace itself exported to modules, it might be considerable
senario.
Here we talked on github.
https://github.com/dynup/kpatch/issues/47
To protect modified regs-ip from each other, this series
introduces FTRACE_OPS_FL_IPMODIFY flag and ftrace now ensures
the flag can be set on each function entry location. If there
is someone who already reserve regs->ip on target function
entry, ftrace_set_filter_ip or register_ftrace_function will
return -EBUSY. Users must handle that.
At this point, all kprobes will reserve regs->ip, since jprobe
requires it.
Thank you,
---
Masami Hiramatsu (2):
ftrace: Simplify ftrace_hash_disable/enable path in ftrace_hash_move
ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict
Documentation/trace/ftrace.txt | 5 +
include/linux/ftrace.h | 10 ++-
kernel/kprobes.c | 2 -
kernel/trace/ftrace.c | 152 ++++++++++++++++++++++++++++++++++------
4 files changed, 143 insertions(+), 26 deletions(-)
--
next reply other threads:[~2014-06-10 10:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 10:50 Masami Hiramatsu [this message]
2014-06-10 10:50 ` [PATCH ftrace/core 1/2] ftrace: Simplify ftrace_hash_disable/enable path in ftrace_hash_move Masami Hiramatsu
2014-06-10 10:50 ` [PATCH ftrace/core 2/2] ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict Masami Hiramatsu
2014-06-10 13:53 ` Namhyung Kim
2014-06-11 1:28 ` Masami Hiramatsu
2014-06-11 7:41 ` Namhyung Kim
2014-06-12 3:29 ` Masami Hiramatsu
2014-06-12 5:38 ` Namhyung Kim
2014-06-12 6:06 ` Masami Hiramatsu
2014-06-12 5:54 ` Namhyung Kim
2014-06-12 6:57 ` Masami Hiramatsu
2014-06-11 16:58 ` [PATCH ftrace/core 0/2] ftrace, kprobes: Introduce IPMODIFY flag for ftrace_ops to detect conflicts Josh Poimboeuf
2014-06-12 3:28 ` Namhyung Kim
2014-06-12 12:50 ` Josh Poimboeuf
2014-06-12 5:44 ` Masami Hiramatsu
2014-06-12 12:43 ` Josh Poimboeuf
2014-06-13 10:09 ` 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=20140610105001.8732.93502.stgit@kbuild-fedora.novalocal \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=ananth@in.ibm.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®