lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260208040156.005531619@kernel.org>
Date: Sat, 07 Feb 2026 23:01:56 -0500
From: Steven Rostedt <rostedt@...nel.org>
To: linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
 Mark Rutland <mark.rutland@....com>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH v2 0/3] tracing: Clean up the snapshot and max tracer code

When tracing first was added it had latency tracers that used a separate
snapshot buffer to swap the current buffer being written to with a static
buffer that is only read. This later became a feature that user space could
use by attaching to the latency tracer snapshot buffer. But the buffer was
named max_buffer which is not what it is used for in all cases.

Rename the max_buffer name to snapshot_buffer.

The "use_max_tr" field of the tracer structure is only defined when
CONFIG_TRACER_MAX_TRACE is defined. To get rid of some of the #ifdefs in the
code around accesses of that field, use a helper function
tracer_uses_snapshot() that access the field when the config is defined, or
returns false if not.

Finally, since the latency tracers use the snapshot buffer and snapshot
buffers do not need latency tracers, have the TRACER_MAX_TRACE config select
TRACE_SNAPSHOT config and not the other way around. Also clean up the code
to properly protect the max tracer references and the snapshot references.

Changes since v1: https://lore.kernel.org/linux-trace-kernel/20260206193741.767171392@kernel.org/

- This separates the updates to snapshot buffer and max tracers from
  the last series. It was a rewrite.

Steven Rostedt (3):
      tracing: Rename trace_array field max_buffer to snapshot_buffer
      tracing: Add tracer_uses_snapshot() helper to remove #ifdefs
      tracing: Better separate SNAPSHOT and MAX_TRACE options

----
 kernel/trace/Kconfig          |   8 +-
 kernel/trace/trace.c          | 190 +++++++++++++++++++-----------------------
 kernel/trace/trace.h          |  44 ++++++----
 kernel/trace/trace_selftest.c |  10 +--
 4 files changed, 127 insertions(+), 125 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ