lkml.org 
[lkml]   [2018]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] tracing: kprobes: Prohibit probing on notrace functions
Date
Kprobe code has a mecanism protecting against triggering kprobe during
the handling of an event. If a kprobe is placed between the kprobe
handling entry point and the activation of this protection, the user can
cause an infinite kprobe recursion leading to a kernel crash.

To avoid this, prevent kprobes from being placed in notrace functions.

Also, move the kprobe selftest target function in its own compile unit
so it's not marked as notrace and can thus be used in the ftrace startup
tests.

Francis Deslauriers (1):
selftest/ftrace: Move kprobe selftest function to separate compile
unit

Masami Hiramatsu (1):
tracing: kprobes: Prohibit probing on notrace functions

kernel/trace/Makefile | 5 +++++
kernel/trace/trace_kprobe.c | 35 ++++++++++++++++++++++++-----------
kernel/trace/trace_kprobe_selftest.c | 10 ++++++++++
kernel/trace/trace_kprobe_selftest.h | 7 +++++++
4 files changed, 46 insertions(+), 11 deletions(-)
create mode 100644 kernel/trace/trace_kprobe_selftest.c
create mode 100644 kernel/trace/trace_kprobe_selftest.h

--
2.7.4

\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.185 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site