lkml.org 
[lkml]   [2009]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 3/3][RFC] [PATCH 3/3] tracing/kprobes: Disable tracing registered jprobe callback functions
From: Steven Rostedt <srostedt@redhat.com>

Functions registered with jprobes will cause the function graph tracer
to crash. This is because the implementation of the function graph
tracer and jprobes collide. This patch permanently removes the registered
jprobe function from being traced.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/kprobes.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 5240d75..2589b8a 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -42,6 +42,7 @@
#include <linux/freezer.h>
#include <linux/seq_file.h>
#include <linux/debugfs.h>
+#include <linux/ftrace.h>
#include <linux/kdebug.h>
#include <linux/memory.h>

@@ -897,6 +898,9 @@ int __kprobes register_jprobes(struct jprobe **jps, int num)
jp = jps[i];
addr = arch_deref_entry_point(jp->entry);

+ /* This may mess up function graph tracer */
+ ftrace_disable_function(jp->entry);
+
if (!kernel_text_address(addr))
ret = -EINVAL;
else {
--
1.6.3.3



\
 
 \ /
  Last update: 2009-10-29 22:07    [from the cache]
©2003-2011 Jasper Spaans