tracing: Fixes for 6.15
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | ftrace: Have tracing function args depend on PROBE_EVENTS_BTF_ARGSkernel/ | +1 | 1 reply | |
| 2/4 | tracing: Free module_delta on freeing of persistent ring bufferkernel/ | +1 | 0 replies | |
| 3/4 | ftrace: Add cond_resched() to ftrace_graph_set_hash()kernel/ | +1 | 0 replies | |
| 4/4 | tracing: Verify event formats that have "%*p.."kernel/ samples/ | +13 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Christian Loehle | Libo Chen | Leon Romanovsky |
|---|---|---|---|
| 1/4 | T-b | T-b | |
| 2/4 | |||
| 3/4 | |||
| 4/4 | R-b T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [for-linus][PATCH 0/4] tracing: Fixes for 6.15
tracing fixes for 6.15
- Fix build error when CONFIG_PROBE_EVENTS_BTF_ARGS is not enabled
The tracing of arguments in the function tracer depends on some functions that are only defined when PROBE_EVENTS_BTF_ARGS is enabled. In fact, PROBE_EVENTS_BTF_ARGS also depends on all the same configs as the function argument tracing requires. Just have the function argument tracing depend on PROBE_EVENTS_BTF_ARGS.
- Free module_delta for persistent ring buffer instance
When an instance holds the persistent ring buffer, it allocates a helper array to hold the deltas between where modules are loaded on the last boot and the current boot. This array needs to be freed when the instance is freed.
- Add cond_reschd() to loop in ftrace_graph_set_hash()
The hash functions in ftrace loop over every function that can be enabled by ftrace. This can be 50,000 functions or more. This loop is known to trigger soft lockup warnings and requires a cond_resched(). The loop in ftrace_graph_set_hash() was missing it.
- Fix the event format verifier to include "%*p.." arguments
To prevent events from dereferencing stale pointers that can happen if a trace event uses a dereferece pointer to something that was not copied into the ring buffer and can be freed by the time the trace is read, a verifier is called. At boot or module load, the verifier scans the print format string for pointers that can be dereferenced and it checks the arguments to make sure they do not contain something that can be freed. The "%*p" was not handled, which would add another argument and cause the verifier to not only not verify this pointer, but it will look at the wrong argument for every pointer after that.
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes
Head SHA1: 1bf4f0161e70a33c602732c5e0f0fdb268f130e1
Steven Rostedt (3):
ftrace: Have tracing function args depend on PROBE_EVENTS_BTF_ARGS
tracing: Free module_delta on freeing of persistent ring buffer
tracing: Verify event formats that have "%*p.."
zhoumin (1):
ftrace: Add cond_resched() to ftrace_graph_set_hash()
----
kernel/trace/Kconfig | 3 +-- kernel/trace/ftrace.c | 1 + kernel/trace/trace.c | 1 + kernel/trace/trace_events.c | 7 +++++++ samples/trace_events/trace-events-sample.h | 8 ++++++-- 5 files changed, 16 insertions(+), 4 deletions(-)