linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ftrace/core  0/2] ftrace, kprobes: Introduce IPMODIFY flag for ftrace_ops to detect conflicts
@ 2014-06-10 10:50 Masami Hiramatsu
  2014-06-10 10:50 ` [PATCH ftrace/core 1/2] ftrace: Simplify ftrace_hash_disable/enable path in ftrace_hash_move Masami Hiramatsu
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Masami Hiramatsu @ 2014-06-10 10:50 UTC (permalink / raw)
  To: Steven Rostedt, Josh Poimboeuf
  Cc: Ingo Molnar, Namhyung Kim, Linux Kernel Mailing List,
	Ananth N Mavinakayanahalli

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(-)

--



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-06-13 10:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 10:50 [PATCH ftrace/core 0/2] ftrace, kprobes: Introduce IPMODIFY flag for ftrace_ops to detect conflicts Masami Hiramatsu
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).