public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [for-linus][PATCH 0/9] tracing: Fixes and cleanups for v6.11
Date: Thu, 08 Aug 2024 10:20:37 -0400	[thread overview]
Message-ID: <20240808142037.495820579@goodmis.org> (raw)


tracing fixes for v6.11:

- Have reading of event format files test if the meta data still exists.
  When a event is freed, a flag (EVENT_FILE_FL_FREED) in the meta data is
  set to state that it is to prevent any new references to it from happening
  while waiting for existing references to close. When the last reference
  closes, the meta data is freed. But the "format" was missing a check to
  this flag (along with some other files) that allowed new references to
  happen, and a use-afte-free bug to occur.

- Have the trace event meta data use the refcount infrastructure instead
  of relying on its own atomic counters.

- Have tracefs inodes use alloc_inode_sb() for allocation instead of
  using kmem_cache_alloc() directly.

- Have eventfs_create_dir() return an ERR_PTR instead of NULL as
  the callers expect a real object or an ERR_PTR.

- Have release_ei() use call_srcu() and not call_rcu() as all the
  protection is on SRCU and not RCU.

- Fix ftrace_graph_ret_addr() to use the task passed in and not current.

- Fix overflow bug in get_free_elt() where the counter can overflow
  the integer and cause an infinite loop.

- Remove unused function ring_buffer_nr_pages()

- Have tracefs freeing use the inode RCU infrastructure instead of
  creating its own. When the kernel had randomize structure fields
  enabled, the rcu field of the tracefs_inode was overlapping the
  rcu field of the inode structure, and corrupting it. Instead,
  use the destroy_inode() callback to do the initial cleanup of
  the code, and then have free_inode() free it.

Jianhui Zhou (1):
      ring-buffer: Remove unused function ring_buffer_nr_pages()

Mathias Krause (3):
      tracefs: Fix inode allocation
      eventfs: Don't return NULL in eventfs_create_dir()
      eventfs: Use SRCU for freeing eventfs_inodes

Petr Pavlu (1):
      function_graph: Fix the ret_stack used by ftrace_graph_ret_addr()

Steven Rostedt (3):
      tracing: Have format file honor EVENT_FILE_FL_FREED
      tracing: Use refcount for trace_event_file reference counter
      tracefs: Use generic inode RCU for synchronizing freeing

Tze-nan Wu (1):
      tracing: Fix overflow in get_free_elt()

----
 fs/tracefs/event_inode.c            |  4 ++--
 fs/tracefs/inode.c                  | 12 +++++------
 fs/tracefs/internal.h               |  5 +----
 include/linux/ring_buffer.h         |  1 -
 include/linux/trace_events.h        |  2 +-
 kernel/trace/fgraph.c               |  2 +-
 kernel/trace/ring_buffer.c          | 12 -----------
 kernel/trace/trace.h                | 23 +++++++++++++++++++++
 kernel/trace/trace_events.c         | 41 ++++++++++++++++++++++---------------
 kernel/trace/trace_events_hist.c    |  4 ++--
 kernel/trace/trace_events_inject.c  |  2 +-
 kernel/trace/trace_events_trigger.c |  6 +++---
 kernel/trace/tracing_map.c          |  6 +++---
 13 files changed, 66 insertions(+), 54 deletions(-)

             reply	other threads:[~2024-08-08 14:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 14:20 Steven Rostedt [this message]
2024-08-08 14:20 ` [for-linus][PATCH 1/9] tracing: Have format file honor EVENT_FILE_FL_FREED Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 2/9] tracing: Use refcount for trace_event_file reference counter Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 3/9] tracefs: Fix inode allocation Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 4/9] eventfs: Dont return NULL in eventfs_create_dir() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 5/9] eventfs: Use SRCU for freeing eventfs_inodes Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 6/9] function_graph: Fix the ret_stack used by ftrace_graph_ret_addr() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 7/9] tracing: Fix overflow in get_free_elt() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 8/9] ring-buffer: Remove unused function ring_buffer_nr_pages() Steven Rostedt
2024-08-08 14:20 ` [for-linus][PATCH 9/9] tracefs: Use generic inode RCU for synchronizing freeing Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240808142037.495820579@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox