All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/6] tracing: Remove backup instance after read all
@ 2026-02-10  8:43 Masami Hiramatsu (Google)
  2026-02-10  8:43 ` [PATCH v8 1/6] tracing: Fix to set write permission to per-cpu buffer_size_kb Masami Hiramatsu (Google)
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Masami Hiramatsu (Google) @ 2026-02-10  8:43 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Masami Hiramatsu, Mathieu Desnoyers, linux-kernel,
	linux-trace-kernel

Hi,

Here is the v8 of the series to improve backup instances of
the persistent ring buffer. The previous version is here:

https://lore.kernel.org/all/177062912135.1230888.17419570791737357433.stgit@mhiramat.tok.corp.google.com/

In this version, I modified the tracefs to check the file permission
even if the user has CAP_DAC_OVERRIDE as same as sysfs[3/6] and remove
read-only check from each read() operations[4/6]. Also add a bugfix [2/6]
for per-cpu buffer_size_kb permission.

Series Description
------------------
Since backup instances are a kind of snapshot of the persistent
ring buffer, it should be readonly. And if it is readonly
there is no reason to keep it after reading all data via trace_pipe
because the data has been consumed. But user should be able to remove
the readonly instance by rmdir or truncating `trace` file.

Thus, [3/5] makes backup instances readonly (not able to write any
events, cleanup trace, change buffer size). Also, [4/5] removes the
backup instance after consuming all data via trace_pipe.
With this improvements, even if we makes a backup instance (using
the same amount of memory of the persistent ring buffer), it will
be removed after reading the data automatically.

---

Masami Hiramatsu (Google) (6):
      tracing: Fix to set write permission to per-cpu buffer_size_kb
      tracing: Reset last_boot_info if ring buffer is reset
      tracefs: Check file permission even if user has CAP_DAC_OVERRIDE
      tracing: Make the backup instance non-reusable
      tracing: Remove the backup instance automatically after read
      tracing/Documentation: Add a section about backup instance


 Documentation/trace/debugging.rst |   19 +++++
 fs/tracefs/event_inode.c          |    2 +
 fs/tracefs/inode.c                |   36 +++++++++-
 fs/tracefs/internal.h             |    3 +
 kernel/trace/trace.c              |  140 ++++++++++++++++++++++++++++---------
 kernel/trace/trace.h              |   13 +++
 kernel/trace/trace_boot.c         |    5 +
 kernel/trace/trace_events.c       |   76 ++++++++++++--------
 8 files changed, 224 insertions(+), 70 deletions(-)

--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

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

end of thread, other threads:[~2026-03-31  9:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10  8:43 [PATCH v8 0/6] tracing: Remove backup instance after read all Masami Hiramatsu (Google)
2026-02-10  8:43 ` [PATCH v8 1/6] tracing: Fix to set write permission to per-cpu buffer_size_kb Masami Hiramatsu (Google)
2026-02-10  8:43 ` [PATCH v8 2/6] tracing: Reset last_boot_info if ring buffer is reset Masami Hiramatsu (Google)
2026-02-10  8:43 ` [PATCH v8 3/6] tracefs: Check file permission even if user has CAP_DAC_OVERRIDE Masami Hiramatsu (Google)
2026-02-11 15:46   ` Steven Rostedt
2026-02-12  6:15     ` Masami Hiramatsu
2026-03-05 17:33       ` Steven Rostedt
2026-03-31  9:24         ` Masami Hiramatsu
2026-03-24 16:43   ` Steven Rostedt
2026-02-10  8:43 ` [PATCH v8 4/6] tracing: Make the backup instance non-reusable Masami Hiramatsu (Google)
2026-02-10  8:44 ` [PATCH v8 5/6] tracing: Remove the backup instance automatically after read Masami Hiramatsu (Google)
2026-02-10  8:44 ` [PATCH v8 6/6] tracing/Documentation: Add a section about backup instance Masami Hiramatsu (Google)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.