mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [for-linus][PATCH 0/5] tracing: Fixes for v6.16
@ 2025-06-03 17:11 Steven Rostedt
  2025-06-03 17:11 ` [for-linus][PATCH 1/5] ftrace: Fix UAF when lookup kallsym after ftrace disabled Steven Rostedt
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Steven Rostedt @ 2025-06-03 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton


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/20250529130138.544ffec4@gandalf.local.home/

  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(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-05 14:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-03 17:11 [for-linus][PATCH 0/5] tracing: Fixes for v6.16 Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 1/5] ftrace: Fix UAF when lookup kallsym after ftrace disabled Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 2/5] ftrace: Dont allocate ftrace module map if ftrace is disabled Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 3/5] xdp: Remove unused mem_return_failed event Steven Rostedt
2025-06-05 14:27   ` John Fastabend
2025-06-03 17:11 ` [for-linus][PATCH 4/5] genirq/matrix: Remove unused irq_matrix_alloc_reserved tracepoint Steven Rostedt
2025-06-03 17:11 ` [for-linus][PATCH 5/5] fsdax: Remove unused trace events for dax insert mapping Steven Rostedt
2025-06-03 18:13   ` Dan Williams
2025-06-03 19:19     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®