[for-linus][PATCH 0/5] ring-buffer: Fixes for 7.1

Steven Rostedt posted 5 patches 3 days, 5 hours ago
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
[for-linus][PATCH 0/5] ring-buffer: Fixes for 7.1
Posted by Steven Rostedt 3 days, 5 hours ago
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\ufffd\ufffdschuh (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