From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) (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 2DEAD378D88 for ; Wed, 17 Jun 2026 20:32:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781728371; cv=none; b=vGC4LzWhbzl9w4f1l1JF9T9zTcTS3V0dWgVqRwSP7AHtwNwmOvvfW4NKgWYSMLJQZw6WUhEaqIytjw2541LwCvenmJWJIfn163o8IOfcpitHQd3peCyRjDEEdVXkWyEiCgBewShk9MUbkVoiefZJNfuHypvWN+DUEvsgg/NwAic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781728371; c=relaxed/simple; bh=TLh9y5Gg3KL/rTLw/HdwxbcAYTHRxmX+6kuS9bfILLg=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=cj/mRa7iEhDnldCgm8mCqUzt34orUj6E3q+vs8CNE7VpaYuws3OGybrfruwB7V+pWmvqV+JvjSC9ZFsL9AqaELLgjkkHIBLzh28HYw2doaryFObM3KAxdBf3TeHPtbMXoBCk86eiDt7WO/NiFvfIrMuYtW28Kk4bcqP7Se3UlV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf14.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 662EC405C3; Wed, 17 Jun 2026 20:32:42 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf14.hostedemail.com (Postfix) with ESMTPA id 415552F; Wed, 17 Jun 2026 20:32:40 +0000 (UTC) Date: Wed, 17 Jun 2026 16:32:38 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton Subject: [GIT PULL] ring-buffer: Updates for 7.2 Message-ID: <20260617163238.1e6786b7@fedora> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 415552F X-Stat-Signature: uo1nogfa3ruc35f5edks6rr94x8iunsw X-Rspamd-Server: rspamout07 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX19lsmVo6eDS/DfxcOYf0QPy5eCLdsvD+VU= X-HE-Tag: 1781728360-529549 X-HE-Meta: U2FsdGVkX19zGkspLG7q8Ug6FvFVhY9u7WYUbdbYD5vjik4E8tZxknnNx0A1BpHwL2lROkcUWM8Jj9u8Ch8HVy4a5SSI00GDkM0CLZgsmztk9vkPxqHTCBICQ30mK8RW2Y3EV9yXltTf6LoePspz+YxTQeKWz0m17BMyCLJL4KiOoA+xwku4QMSNC83ucFyam5pMOU3swNr3aAgmOMcO3AT/bkA0AjuquGVDmA6nX6ag4XfCi5TBTwMfWLaXTpcnWysh3RaZotzGMfFQEZtHDG+VMap5aZ+qGZMXCothne6iIWbPkQnEXcUUkTv1iFyr9tgiR5JBrK0Lgr20h4ajUPyVdzK6jBHR Linus, ring-buffer: Updates for v7.2: - Do not invalidate entire buffer for invalid sub-buffers For the persistent ring buffer, if one sub-buffer is found to be invalid, it invalidates the entire per CPU ring buffer. This can lose a lot of valuable data if there's some corruption with the writes to the buffer not syncing properly on a hard crash. Instead, if a sub-buffer is found to be invalid, simply zero it out and mark it for "missed events". When the persistent ring buffer is read and a sub-buffer that was cleared due to being invalid on boot up is discovered, the output will show "[LOST EVENTS]" to let the user know that events were missing at that location. Displaying the events from valid buffers can still be useful. - Add a test to be able to test corrupted sub-buffers If a persistent ring buffer is created as "ptracingtest" and the new config that adds the test is enabled, when a panic happens, the kernel will randomly corrupt one of the per CPU ring buffers. On boot up, the sub-buffers with the corruption should be cleared and flagged. When reading this buffer, the missed events should should [LOST EVENTS]. - Add commit number in the sub-buffer meta debug info The commit is used to know the content of a meta page. Add it to the buffer_meta file that is shown for each per CPU buffer. - Clean up the persistent ring buffer validation code Add some helper functions and make variable names more consistent. Please pull the latest trace-ring-buffer-v7.2 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git trace-ring-buffer-v7.2 Tag SHA1: eec08f17230e4b945157bba627e71a542e291784 Head SHA1: 4e8729e6598ba0d10021dbf48b308cd53a06bbc4 Masami Hiramatsu (Google) (6): ring-buffer: Skip invalid sub-buffers when validating persistent ring buffer ring-buffer: Skip invalid sub-buffers when rewinding persistent ring buffer ring-buffer: Add persistent ring buffer invalid-page inject test ring-buffer: Show commit numbers in buffer_meta file ring-buffer: Cleanup persistent ring buffer validation ring-buffer: Cleanup buffer_data_page related code Steven Rostedt (4): ring-buffer: Have dropped subbuffers be persistent across reboots ring-buffer: Show persistent buffer dropped events in trace file ring-buffer: Show persistent buffer dropped events in trace_pipe file ring-buffer: Better comment the use of RB_MISSED_EVENTS ---- include/linux/ring_buffer.h | 1 + kernel/trace/Kconfig | 34 +++ kernel/trace/ring_buffer.c | 557 ++++++++++++++++++++++++++++++-------------- kernel/trace/trace.c | 4 + 4 files changed, 416 insertions(+), 180 deletions(-) ---------------------------