Re: [PATCH] tracing: Do not allow mmap() of persistent ring buffer

Steven Rostedt
2025-02-15T16:21:55Z

On Sun, 16 Feb 2025 00:37:02 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> My concern is related to the fixes policy. If this is a "fix", we will
> backport the new "disables mmap on persistent ring buffer" limitation
> to the stable kernel (that was not documented previously.)
>
> However, from the user point of view, "mmap() ring buffers" is already
> supported (although it did not work on stable kernel for now). Thus I think
> the "Fix" is expected as "fixing mmap() persistent ring buffer".

This only disables mmapping of the persistent ring buffer. Other ring
buffers can be mapped. We never supported mmapping the persistent ring
buffer. Even in stable kernels, if you mmap it, it will crash just like
it does now. Thus, this doesn't cause any regressions. It's a fix even
for stable kernels.

Or did the virt_to_page() change recently where that wasn't the case?

-- Steve