Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Vincent Donnefort <vdonnefort@google.com>
To: Lee Jones <lee@kernel.org>
Cc: stable@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org,
	linux-trace-kernel@vger.kernel.org,
	mathieu.desnoyers@efficios.com, kernel-team@android.com,
	linux-kernel@vger.kernel.org
Subject: Re: STABLE REQ: [PATCH v5 06/10] tracing: Fix subbuf resize races with trace_pipe_raw readers
Date: Tue, 1 Sep 2026 14:50:15 +0100	[thread overview]
Message-ID: <apbYF8rGD5EKG-oq@google.com> (raw)
In-Reply-To: <20260901123444.GA1350131@google.com>

On Tue, Sep 01, 2026 at 01:34:44PM +0100, Lee Jones wrote:
> Dear Stable,
> 
> > Concurrent subbuffer resizes may crash trace_pipe_raw readers or leak
> > uninitialized memory to userspace due to stale size values.
> > 
> > Modify ring_buffer_alloc_read_page() to let it handle the resizing of
> > a previous buffer_data_read_page if necessary and add a new
> > ring_buffer_read_page_size() which enable ring-buffer users to not use
> > the racy ring_buffer_subbuf_size_get(). This makes the spare_size member
> > of ftrace_buffer_info redundant.
> > 
> > Use those functions in trace_pipe_raw readers and handle in both the
> > case where the subbuf order is modified in the middle of the read.
> > 
> > Fixes: bce761d75745 ("ring-buffer: Read and write to ring buffers with custom sub buffer size")
> > Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
> 
> Not sure if this is the latest version or not?
> 
> I see review comments, but no v6.  Anyway, no matter, it'll do.
> 
> Could we have this applied to Stable please:
> 
> 8a5f63637890 ("ring-buffer: Fix subbuf resize race with ring buffer readers")
> 
> -- 
> Lee Jones

Steven hasn't taken all the patches from v5, a few of them were not ready yet.

The latest version is v8 [1]... and I am about to send a v9.

[1] https://lore.kernel.org/all/20260826094528.3738023-1-vdonnefort@google.com/ 

-- 
Vincent

  parent reply	other threads:[~2026-09-01 13:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260813131152.3589632-1-vdonnefort@google.com>
     [not found] ` <20260813131152.3589632-7-vdonnefort@google.com>
2026-09-01 12:34   ` STABLE REQ: [PATCH v5 06/10] tracing: Fix subbuf resize races with trace_pipe_raw readers Lee Jones
2026-09-01 13:46     ` Steven Rostedt
2026-09-02  8:27       ` Lee Jones
2026-09-02  8:44         ` Greg KH
2026-09-02  9:57           ` Lee Jones
2026-09-02 11:38             ` Greg KH
2026-09-02 11:59               ` Lee Jones
2026-09-02 12:21                 ` Steven Rostedt
2026-09-02 12:25                   ` Steven Rostedt
2026-09-02 16:22                     ` Lee Jones
2026-09-02 16:33                       ` Steven Rostedt
2026-09-03  8:38                         ` Lee Jones
2026-09-01 13:50     ` Vincent Donnefort [this message]
2026-09-02 22:14     ` Sasha Levin
2026-09-03  9:35       ` Vincent Donnefort
2026-09-03 12:34         ` Lee Jones
2026-09-03 12:44           ` STABLE REQ: [PATCH v5 06/10] tracing: Fix subbuf resize races with trace_pipe_raw readers\ Sasha Levin
2026-09-03 16:13             ` Lee Jones

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=apbYF8rGD5EKG-oq@google.com \
    --to=vdonnefort@google.com \
    --cc=kernel-team@android.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.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