From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
Arjan van de Ven <arjan@infradead.org>
Cc: Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 4/5] ftrace: do not trace nmi callers in kernel directory
Date: Tue, 29 Jul 2008 21:29:43 -0400 [thread overview]
Message-ID: <20080730014351.248109376@goodmis.org> (raw)
In-Reply-To: 20080730012939.885172468@goodmis.org
[-- Attachment #1: ftrace-no-trace-nmi-kernel.patch --]
[-- Type: text/plain, Size: 1382 bytes --]
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
--
next prev parent reply other threads:[~2008-07-30 1:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 1:29 [PATCH 0/5] ftrace: do not trace NMI handlers Steven Rostedt
2008-07-30 1:29 ` [PATCH 1/5] ftrace: do not trace nmi callers in x86 Steven Rostedt
2008-07-30 1:29 ` [PATCH 2/5] ftrace: do not trace nmi callers in drivers Steven Rostedt
2008-07-30 1:29 ` [PATCH 3/5] ftrace: do not trace nmi callers in RCU Steven Rostedt
2008-07-30 1:29 ` Steven Rostedt [this message]
2008-07-30 1:29 ` [PATCH 5/5] ftrace: warn on NMI calling code that may be modified Steven Rostedt
2008-07-30 7:28 ` [PATCH 0/5] ftrace: do not trace NMI handlers Peter Zijlstra
2008-07-30 14:04 ` Mathieu Desnoyers
2008-07-30 14:23 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080730014351.248109376@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox