Skip to content

ftrace: Fixes for v6.13

Steven Rostedt lkml oe-kbuild-all stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fgraph: Add READ_ONCE() when accessing fgraph_array[]kernel/trace/fgraph.c+1 -12 replies
2/2ftrace: Fix function profilers filtering functionalitykernel/trace/ftrace.c+2 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [for-linus][PATCH 0/2] ftrace: Fixes for v6.13

Fixes for ftrace in v6.13:

- Add needed READ_ONCE() around access to the fgraph array element

The updates to the fgraph array can happen when callbacks are registered and unregistered. The __ftrace_return_to_handler() can handle reading either the old value or the new value. But once it reads that value it must stay consistent otherwise the check that looks to see if the value is a stub may show false, but if the compiler decides to re-read after that check, it can be true which can cause the code to crash later on.

- Make function profiler use the top level ops for filtering again

When function graph became available for instances, its filter ops became independent from the top level set_ftrace_filter. In the process the function profiler received its own filter ops as well. But the function profiler uses the top level set_ftrace_filter file and does not have one of its own. In giving it its own filter ops, it lost any user interface it once had. Make it use the top level set_ftrace_filter file again. This fixes a regression.