From: Steven Rostedt <rostedt@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [for-linus][PATCH 0/6] tracing: Fixes for v6.17
Date: Wed, 20 Aug 2025 20:00:00 -0400 [thread overview]
Message-ID: <20250821000000.210778097@kernel.org> (raw)
tracing fixes for v6.17-rc2:
- Fix rtla and latency tooling pkg-config errors
If libtraceevent and libtracefs is installed, but their corresponding '.pc'
files are not installed, it reports that the libraries are missing and
confuses the developer. Instead, report that the pkg-config files are
missing and should be installed.
- Fix overflow bug of the parser in trace_get_user()
trace_get_user() uses the parsing functions to parse the user space strings.
If the parser fails due to incorrect processing, it doesn't terminate the
buffer with a nul byte. Add a "failed" flag to the parser that gets set when
parsing fails and is used to know if the buffer is fine to use or not.
- Remove a semicolon that was at an end of a comment line
- Fix register_ftrace_graph() to unregister the pm notifier on error
The register_ftrace_graph() registers a pm notifier but there's an error
path that can exit the function without unregistering it. Since the function
returns an error, it will never be unregistered.
- Allocate and copy ftrace hash for reader of ftrace filter files
When the set_ftrace_filter or set_ftrace_notrace files are open for read,
an iterator is created and sets its hash pointer to the associated hash that
represents filtering or notrace filtering to it. The issue is that the hash
it points to can change while the iteration is happening. All the locking
used to access the tracer's hashes are released which means those hashes can
change or even be freed. Using the hash pointed to by the iterator can cause
UAF bugs or similar.
Have the read of these files allocate and copy the corresponding hashes and
use that as that will keep them the same while the iterator is open. This
also simplifies the code as opening it for write already does an allocate
and copy, and now that the read is doing the same, there's no need to check
which why it was opened on the release of the file, and the iterator hash
can always be freed.
Liao Yuanhong (1):
ring-buffer: Remove redundant semicolons
Pu Lehui (1):
tracing: Limit access to parser->buffer when trace_get_user failed
Steven Rostedt (1):
ftrace: Also allocate and copy hash for reading of filter files
Tao Chen (2):
tools/latency-collector: Check pkg-config install
rtla: Check pkg-config install
Ye Weihua (1):
trace/fgraph: Fix the warning caused by missing unregister notifier
----
kernel/trace/fgraph.c | 1 +
kernel/trace/ftrace.c | 16 +++++++---------
kernel/trace/ring_buffer.c | 2 +-
kernel/trace/trace.c | 18 ++++++++++++------
kernel/trace/trace.h | 8 +++++++-
tools/tracing/latency/Makefile.config | 8 ++++++++
tools/tracing/rtla/Makefile.config | 8 ++++++++
7 files changed, 44 insertions(+), 17 deletions(-)
next reply other threads:[~2025-08-21 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 0:00 Steven Rostedt [this message]
2025-08-21 0:00 ` [for-linus][PATCH 1/6] tools/latency-collector: Check pkg-config install Steven Rostedt
2025-08-21 0:00 ` [for-linus][PATCH 2/6] rtla: " Steven Rostedt
2025-08-21 0:00 ` [for-linus][PATCH 3/6] tracing: Limit access to parser->buffer when trace_get_user failed Steven Rostedt
2025-08-21 0:00 ` [for-linus][PATCH 4/6] ring-buffer: Remove redundant semicolons Steven Rostedt
2025-08-21 0:00 ` [for-linus][PATCH 5/6] trace/fgraph: Fix the warning caused by missing unregister notifier Steven Rostedt
2025-08-21 0:00 ` [for-linus][PATCH 6/6] ftrace: Also allocate and copy hash for reading of filter files Steven Rostedt
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=20250821000000.210778097@kernel.org \
--to=rostedt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-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