[PATCH 3/3][RFC] [PATCH 3/3] tracing/kprobes: Disable tracing registered jprobe callback functions

From: Steven Rostedt
Date: Thu Oct 29 2009 - 17:05:39 EST


From: Steven Rostedt <srostedt@xxxxxxxxxx>

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@xxxxxxxxxxx>
---
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/