Skip to content

tracing: Fixes for v6.14

Steven Rostedt lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tracing: Fix bad hist from corrupting named_triggers listkernel/trace/trace_events_hist.c+15 -150 replies
2/3selftests/ftrace: Let fprobe test consider already enabled functionstools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc+11 -70 replies
3/3ftrace: Avoid potential division by zero in function_stat_show()kernel/trace/ftrace.c+12 -150 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchTomas GlozarTom ZanussiMasami Hiramatsu (Google)
1/3T-b R-b
2/3A-b
3/3

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.

Read the v1 thread

Cover letter [for-linus][PATCH 0/3] tracing: Fixes for v6.14

Tracing fixes for v6.14:

- Fix crash from bad histogram entry

An error path in the histogram creation could leave an entry in a link list that gets freed. Then when a new entry is added it can cause a u-a-f bug. This is fixed by restructuring the code so that the histogram is consistent on failure and everything is cleaned up appropriately.

- Fix fprobe self test

The fprobe self test relies on no function being attached by ftrace. BPF programs can attach to functions via ftrace and systemd now does so. This causes those functions to appear in the enabled_functions list which holds all functions attached by ftrace. The selftest also uses that file to see if functions are being connected correctly. It counts the functions in the file, but if there's already functions in the file, it fails. Instead, add the number of functions in the file at the start of the test to all the calculations during the test.

- Fix potential division by zero of the function profiler stddev

The calculated divisor that calculates the standard deviation of the function times can overflow. If the overflow happens to land on zero, that can cause a division by zero. Check for zero from the calculation before doing the division.

TODO: Catch when it ever overflows and report it accordingly.
For now, just prevent the system from crashing.

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes

Head SHA1: a1a7eb89ca0b89dc1c326eeee2596f263291aca3

Heiko Carstens (1):
selftests/ftrace: Let fprobe test consider already enabled functions

Nikolay Kuratov (1):
ftrace: Avoid potential division by zero in function_stat_show()

Steven Rostedt (1):
tracing: Fix bad hist from corrupting named_triggers list

----

 kernel/trace/ftrace.c                              | 27 +++++++++----------
 kernel/trace/trace_events_hist.c                   | 30 +++++++++++-----------
 .../ftrace/test.d/dynevent/add_remove_fprobe.tc    | 18 ++++++++-----
 3 files changed, 38 insertions(+), 37 deletions(-)