lkml.org 
[lkml]   [2008]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 29 Jul 2008 21:29:43 -0400
FromSteven Rostedt <>
Subject[PATCH 4/5] ftrace: do not trace nmi callers in kernel directory
The dynamic ftrace code performs run time modification of the code text
section. This is not safe to do unless all other CPUS are halted. Because
there is no good way to halt NMIs while doing the modification, we must
make sure that the NMIs will not execute code that will be modified.

This patch adds notrace annotation to functions called by NMIs in the
kernel directory.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/Makefile | 7 +++++++
1 file changed, 7 insertions(+)
Index: linux-tip.git/kernel/Makefile
===================================================================
--- linux-tip.git.orig/kernel/Makefile 2008-07-29 20:13:14.000000000 -0400
+++ linux-tip.git/kernel/Makefile 2008-07-29 20:33:51.000000000 -0400
@@ -15,6 +15,8 @@ CFLAGS_REMOVE_sched.o = -mno-spe

ifdef CONFIG_FTRACE
# Do not trace debug files and internal ftrace files
+CFLAGS_REMOVE_kprobes.o = -pg
+CFLAGS_REMOVE_test_kprobes.o = -pg
CFLAGS_REMOVE_lockdep.o = -pg
CFLAGS_REMOVE_lockdep_proc.o = -pg
CFLAGS_REMOVE_mutex-debug.o = -pg
@@ -22,6 +24,11 @@ CFLAGS_REMOVE_rtmutex-debug.o = -pg
CFLAGS_REMOVE_cgroup-debug.o = -pg
CFLAGS_REMOVE_sched_clock.o = -pg
CFLAGS_REMOVE_sched.o = -mno-spe -pg
+ifdef CONFIG_DYNAMIC_FTRACE
+# NMI called files
+CFLAGS_REMOVE_notifier.o = -pg
+CFLAGS_REMOVE_spinlock.o = -pg
+endif
endif

obj-$(CONFIG_PROFILING) += profile.o
--


\
 
 \ /
  Last update: 2008-07-30 03:49    [from the cache]
©2003-2010