From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Mark Rutland <mark.rutland@arm.com>
Subject: [PATCH] tracing: Add notrace to event functions that hook to ftrace
Date: Thu, 19 Nov 2026 12:43:19 -0500 [thread overview]
Message-ID: <20261119124319.3a8bfe50@gandalf.local.home> (raw)
From: Steven Rostedt <rostedt@goodmis.org>
A few functions in trace_events.c are used to hook to the ftrace function
hooks. Before CONFIG_FUNCTION_SELF_TRACING was added, these functions were not
marked for tracing because the entire directory was set to "notrace". But
now that certain files can be traced by ftrace when the
CONFIG_FUNCTION_SELF_TRACING config is set, individual functions that use ftrace
must be annotated with "notrace" otherwise they can trigger a triple fault
when called.
Annotate the trace_events.c functions that are attached to ftrace with
"notrace.
Cc: stable@vger.kernel.org
Fixes: f93a7d0caccd6 ("ftrace: Allow tracing of some of the tracing code")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_events.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index c9d31c9f3fca..7f89160aeff3 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -4317,7 +4317,7 @@ static void update_event_probe(struct event_probe_data *data)
set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &data->file->flags);
}
-static void
+static void notrace
event_enable_probe(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
@@ -4334,7 +4334,7 @@ event_enable_probe(unsigned long ip, unsigned long parent_ip,
update_event_probe(edata);
}
-static void
+static void notrace
event_enable_count_probe(unsigned long ip, unsigned long parent_ip,
struct trace_array *tr, struct ftrace_probe_ops *ops,
void *data)
@@ -5205,7 +5205,7 @@ static DEFINE_PER_CPU(atomic_t, ftrace_test_event_disable);
static struct trace_event_file event_trace_file __initdata;
-static void __init
+static void notrace __init
function_test_events_call(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct ftrace_regs *regs)
{
--
2.53.0
reply other threads:[~2026-11-19 17:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261119124319.3a8bfe50@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.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