From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15B4720299B for ; Thu, 21 May 2026 13:47:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779371225; cv=none; b=FakSXQt6dobjvWf3QF9JW+FUYa8q//xNqWV68G/rgkeASopaK5lu95eTyqk/Eg3YikFMEFx1/7IHvNPlHP+rSOa/ys7PrttsHZPLmWNPy/KvQhPDSTahfA5PEE+tkYM8aNMbKxIWVHSEHXn/q74n80A4qs7kGJB2zGX6+1vELFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779371225; c=relaxed/simple; bh=nErnz/FqxZ7lTmZQiueGosACS8uMZg7hov6r33iSUwY=; h=Message-ID:Date:From:To:Cc:Subject; b=FGu9GmlBf6Ct5vBiB8tcDkFUCpAYZG+Y5Q+KduBE9wkC7Uw/XQhJ10CugvBW7amQ66rndt5m6QB5aNFiVmCQix9OQnc1IrfhmkvDFc1nUrI/YH3zGN9gc0ToJWESL/9Ji7wP+6Lae4Vi/xjGsMIqYJdS0ZsGrhY9MYlCRbtRP68= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZuyWrDf3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZuyWrDf3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C037E1F000E9; Thu, 21 May 2026 13:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779371223; bh=+TGUNKUl5hvn7pRFApYof7qwDzWvF4FYjhewK4UvtB8=; h=Date:From:To:Cc:Subject; b=ZuyWrDf3R/WAsaemZ93Jk6Xntny6f8XMCnkIQ4h1dC7P9SKOrT5tVgi/uBTjvV2nG r9/9dhRYdTlbXihbLFvIbEnFAGZykpRpyZUFd8V/1FGH/uVAanK3rLnz2ec5TidXhE 2wHazveaVjBtGZj6GU4XIJq5BqDYFwlIhdJtD+xpGOygCYF1hB/rihETffCqeOx9pn JJVZX2bLhKfgXhGnaERUFK034NxWbpcUFGBxQ3BCBL/V4W4PZZVZmaWtLVCd0aLKHa Jjl4hbXxP2BBflmbRR7eXAsJIzehpQ/Z3E9MqDXFEjapSOGaSO2X4I+KB63uuHztIX GTsIIR5gok1KA== Received: from rostedt by gandalf with local (Exim 4.99.2) (envelope-from ) id 1wQ3kC-00000005MPz-3ttP; Thu, 21 May 2026 09:47:24 -0400 Message-ID: <20260521134710.628917428@kernel.org> User-Agent: quilt/0.69 Date: Thu, 21 May 2026 09:47:10 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-linus][PATCH 0/5] ring-buffer: Fixes for 7.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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