lkml.org 
[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v3 0/2] kprobes/x86: Fix up interaction between kprobes code recovery and ftrace
Date
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



\
 
 \ /
  Last update: 2015-02-20 15:21    [W:0.045 / U:3.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site