Skip to content

tracing: Fixes for v6.17

Steven Rostedt lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tools/latency-collector: Check pkg-config installtools/tracing/latency/Makefile.config+8 -00 replies
2/6rtla: Check pkg-config installtools/tracing/rtla/Makefile.config+8 -00 replies
3/6tracing: Limit access to parser->buffer when trace_get_user failedkernel/trace/trace.c kernel/trace/trace.h+19 -70 replies
4/6ring-buffer: Remove redundant semicolonskernel/trace/ring_buffer.c+1 -10 replies
5/6trace/fgraph: Fix the warning caused by missing unregister notifierkernel/trace/fgraph.c+1 -00 replies
6/6ftrace: Also allocate and copy hash for reading of filter fileskernel/trace/ftrace.c+7 -90 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchMasami Hiramatsu (Google)Tengda Wu
1/6
2/6
3/6
4/6
5/6A-b
6/6T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [for-linus][PATCH 0/6] tracing: Fixes for v6.17

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(-)