tracing: Fixes for v6.17
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | tools/latency-collector: Check pkg-config installtools/ | +8 | 0 replies | |
| 2/6 | rtla: Check pkg-config installtools/ | +8 | 0 replies | |
| 3/6 | tracing: Limit access to parser->buffer when trace_get_user failedkernel/ kernel/ | +19 | 0 replies | |
| 4/6 | ring-buffer: Remove redundant semicolonskernel/ | +1 | 0 replies | |
| 5/6 | trace/fgraph: Fix the warning caused by missing unregister notifierkernel/ | +1 | 0 replies | |
| 6/6 | ftrace: Also allocate and copy hash for reading of filter fileskernel/ | +7 | 0 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Masami Hiramatsu (Google) | Tengda Wu |
|---|---|---|
| 1/6 | ||
| 2/6 | ||
| 3/6 | ||
| 4/6 | ||
| 5/6 | A-b | |
| 6/6 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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(-)