Skip to content

tracing: Fixes for v6.16

Steven Rostedt lkml netdev stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ftrace: Fix UAF when lookup kallsym after ftrace disabledkernel/trace/ftrace.c+7 -30 replies
2/5ftrace: Dont allocate ftrace module map if ftrace is disabledkernel/trace/ftrace.c+3 -00 replies
3/5xdp: Remove unused mem_return_failed eventinclude/trace/events/xdp.h+0 -261 reply
4/5genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepointinclude/trace/events/irq_matrix.h+0 -80 replies
5/5fsdax: Remove unused trace events for dax insert mappinginclude/trace/events/fs_dax.h+0 -782 replies

Reviews trailers per patch

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

PatchJesper Dangaard BrouerJakub KicinskiThomas GleixnerAlison SchofieldDan WilliamsJohn Fastabend
1/5
2/5
3/5A-b A-b R-b
4/5R-b
5/5R-b A-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 6 reviewers.

Read the v1 thread

Cover letter [for-linus][PATCH 0/5] tracing: Fixes for v6.16

tracing fixes:

- Fix UAF in module unload in ftrace when there's a bug in the module

If a module is buggy and triggers ftrace_disable which is set when an anomaly is detected, when it gets unloaded it doesn't free the hooks into kallsyms, and when a kallsyms lookup is performed it may access the mod->modname field and crash via UAF.

Fix this by still freeing the mod_maps that are attached to kallsyms on module unload regardless if ftrace_disable is set or not.

- Do not bother allocating mod_maps for kallsyms if ftrace_disable is set

- Remove unused trace events

When a trace event or tracepoint is created but not used, it still creates the code and data structures needed for that trace event. This just wastes memory.

A patch is being worked on to warn when a trace event is created but
not used: https://lore.kernel.org/linux-trace-kernel/[email protected]/

Remove the trace events that are created but not used. This does not remove trace events that are created but are not used due configs not being set. That will be handled later.

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

Head SHA1: 2adb87c9409e11e8bc6c56f8e1e253eb25a7d6ae

Steven Rostedt (3):
xdp: Remove unused mem_return_failed event genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint
fsdax: Remove unused trace events for dax insert mapping

Ye Bin (2):
ftrace: Fix UAF when lookup kallsym after ftrace disabled
ftrace: Don't allocate ftrace module map if ftrace is disabled

----

 include/trace/events/fs_dax.h     | 78 ---------------------------------------
 include/trace/events/irq_matrix.h |  8 ----
 include/trace/events/xdp.h        | 26 -------------
 kernel/trace/ftrace.c             | 13 +++++--
 4 files changed, 10 insertions(+), 115 deletions(-)