Messages in this thread | | | From | Petr Mladek <> | Subject | [PATCH v3 0/2] kprobes/x86: Fix up interaction between kprobes code recovery and ftrace | Date | Fri, 20 Feb 2015 15:07:28 +0100 |
| |
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
| |