Re: [PATCH v9 3/4] ring-buffer: Cap static ring buffer nr_pages

From: Steven Rostedt

Date: Fri Sep 04 2026 - 10:26:37 EST


On Fri, 4 Sep 2026 14:04:40 +0100
Vincent Donnefort <vdonnefort@xxxxxxxxxx> wrote:

> > If you want to add something, we could add to the beginning of this
> > function:
> >
> > /* Prevent ridiculously small sizes */
> > if (size < PAGE_SIZE)
> > return NULL;
> >
> > to shut up Sashiko about overflows :-p
> >
> > -- Steve
>
> tracer_alloc_buffers() uses size of 1 for non-expanded buffers.
>
> I'll test size just before
>
> nr_pages = (size - sizeof(struct ring_buffer_cpu_meta)) /
> (subbuf_size + sizeof(int));
>

Ack.

-- Steve