All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] kprobes/x86: Fix up interaction between kprobes code recovery and ftrace
@ 2015-02-20 14:07 Petr Mladek
  2015-02-20 14:07 ` [PATCH v3 1/2] kprobes/x86: Use 5-byte NOP when the code might be modified by ftrace Petr Mladek
  2015-02-20 14:07 ` [PATCH v3 2/2] kprobes/x86: Check for invalid ftrace location in __recover_probed_insn() Petr Mladek
  0 siblings, 2 replies; 5+ messages in thread
From: Petr Mladek @ 2015-02-20 14:07 UTC (permalink / raw)
  To: Ingo Molnar, Masami Hiramatsu
  Cc: David S. Miller, Anil S Keshavamurthy, Ananth NMavinakayanahalli,
	Frederic Weisbecker, Steven Rostedt, Jiri Kosina, linux-kernel,
	Petr Mladek

The code affected by ftrace was not properly recovered in Kprobe checks.
Also the address returned by ftrace can be used for a consistency check.

This version is based on the feedback for the separate patches, see
https://lkml.org/lkml/2015/2/20/91 and
https://lkml.org/lkml/2015/2/20/90


Changes against v2:

  + avoid using MCOUNT_INSN_SIZE that is available only with
    CONFIG_FUNCTION_TRACER enabled

  + use WARN_ON() instead of BUG_ON() and correctly handle the
    situation when Kprobe is not able to recover the code


Changes against v1:

  + always use 5-byte NOP for ftrace location
  + fix indentation of the touched comment

Petr Mladek (2):
  kprobes/x86: Use 5-byte NOP when the code might be modified by ftrace
  kprobes/x86: Check for invalid ftrace location in
    __recover_probed_insn()

 arch/x86/kernel/kprobes/core.c | 54 +++++++++++++++++++++++++++++++-----------
 arch/x86/kernel/kprobes/opt.c  |  2 ++
 2 files changed, 42 insertions(+), 14 deletions(-)

-- 
1.8.5.6


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

end of thread, other threads:[~2015-02-21 17:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 14:07 [PATCH v3 0/2] kprobes/x86: Fix up interaction between kprobes code recovery and ftrace Petr Mladek
2015-02-20 14:07 ` [PATCH v3 1/2] kprobes/x86: Use 5-byte NOP when the code might be modified by ftrace Petr Mladek
2015-02-21 17:46   ` [tip:perf/urgent] " tip-bot for Petr Mladek
2015-02-20 14:07 ` [PATCH v3 2/2] kprobes/x86: Check for invalid ftrace location in __recover_probed_insn() Petr Mladek
2015-02-21 17:46   ` [tip:perf/urgent] " tip-bot for Petr Mladek

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.