The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@kernel.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/5] ring-buffer: Fixes for 7.1
Date: Thu, 21 May 2026 09:47:10 -0400	[thread overview]
Message-ID: <20260521134710.628917428@kernel.org> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3996 bytes --]


ring-buffer fixes for 7.1:

- Fix reporting MISSED EVENTS in trace iterator

  When the "trace" file is read with tracing enabled, if the writer
  were to pass the iterator reader, it resets, sets a "missed_events"
  flag and continues. The tracing output checks for missed events and
  if there are some, it prints out "[LOST EVENTS]" to let the user
  know events were dropped.

  But the clearing of the missed_events happened when the tracing system
  queried the ring buffer iterator about missed events. This was premature
  as the ring buffer is per CPU, and the tracing code reads all the
  CPU buffers and checks for missed events when it is read. If the
  CPU iterator that had missed events isn't printed next, the output
  for the LOST EVENTS is lost.

  Clear the missed_events flag when the iterator moves to the next event
  and not when the missed_events flag is queried. Also clear it on reset.

- Flush and stop the persistent ring buffer on panic

  On panic the persistent ring buffer is used to debug what caused the
  panic. But on some architectures, it requires flushing the memory
  from cache, otherwise, the ring buffer persistent memory may not have
  the last events and this could also cause the ring buffer to be
  corrupted on the next boot.

- Fix nr_subbufs initialization in simple_ring_buffer_init_mm

  The remote simple ring buffer  meta data nr_subbufs is initialized
  too early and gets cleared later on, making it zero and not reflect
  the actual number of sub-buffers.

- Fix unload_page for simple_ring_buffer init rollback

  On error, the pages loaded need to be unloaded. To unload a page
  it is expected that: page = load_page(va); -> unload_page(page).
  But the code was doing: unload_page(va) and not unload_page(page).

- Create output file from cmd_check_undefined

  The check for undefined symbols checks if the file *.o.checked exists
  and if so it skips doing the work. But the *.o.checked file never
  was created making every build do the work even when it was already
  done previously.

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

Head SHA1: 057caace5214da3b457bbd295e1a2ad34d3685ea


David Carlier (1):
      tracing: Fix nr_subbufs initialization in simple_ring_buffer_init_mm()

Masami Hiramatsu (Google) (1):
      ring-buffer: Flush and stop persistent ring buffer on panic

Steven Rostedt (1):
      ring-buffer: Fix reporting of missed events in iterator

Thomas Weißschuh (1):
      tracing: Create output file from cmd_check_undefined

Vincent Donnefort (1):
      tracing: Fix unload_page for simple_ring_buffer init rollback

----
 arch/alpha/include/asm/Kbuild        |  1 +
 arch/arc/include/asm/Kbuild          |  1 +
 arch/arm/include/asm/Kbuild          |  1 +
 arch/arm64/include/asm/ring_buffer.h | 10 ++++++++++
 arch/csky/include/asm/Kbuild         |  1 +
 arch/hexagon/include/asm/Kbuild      |  1 +
 arch/loongarch/include/asm/Kbuild    |  1 +
 arch/m68k/include/asm/Kbuild         |  1 +
 arch/microblaze/include/asm/Kbuild   |  1 +
 arch/mips/include/asm/Kbuild         |  1 +
 arch/nios2/include/asm/Kbuild        |  1 +
 arch/openrisc/include/asm/Kbuild     |  1 +
 arch/parisc/include/asm/Kbuild       |  1 +
 arch/powerpc/include/asm/Kbuild      |  1 +
 arch/riscv/include/asm/Kbuild        |  1 +
 arch/s390/include/asm/Kbuild         |  1 +
 arch/sh/include/asm/Kbuild           |  1 +
 arch/sparc/include/asm/Kbuild        |  1 +
 arch/um/include/asm/Kbuild           |  1 +
 arch/x86/include/asm/Kbuild          |  1 +
 arch/xtensa/include/asm/Kbuild       |  1 +
 include/asm-generic/ring_buffer.h    | 13 +++++++++++++
 kernel/trace/Makefile                |  3 ++-
 kernel/trace/ring_buffer.c           | 30 +++++++++++++++++++++++++-----
 kernel/trace/simple_ring_buffer.c    |  4 ++--
 25 files changed, 72 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm64/include/asm/ring_buffer.h
 create mode 100644 include/asm-generic/ring_buffer.h

             reply	other threads:[~2026-05-21 13:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 13:47 Steven Rostedt [this message]
2026-05-21 13:47 ` [for-linus][PATCH 1/5] ring-buffer: Fix reporting of missed events in iterator Steven Rostedt
2026-05-21 13:47 ` [for-linus][PATCH 2/5] ring-buffer: Flush and stop persistent ring buffer on panic Steven Rostedt
2026-05-21 13:47 ` [for-linus][PATCH 3/5] tracing: Fix nr_subbufs initialization in simple_ring_buffer_init_mm() Steven Rostedt
2026-05-21 13:47 ` [for-linus][PATCH 4/5] tracing: Fix unload_page for simple_ring_buffer init rollback Steven Rostedt
2026-05-21 13:47 ` [for-linus][PATCH 5/5] tracing: Create output file from cmd_check_undefined 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=20260521134710.628917428@kernel.org \
    --to=rostedt@kernel.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