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

Steven Rostedt
2025-02-14T14:59:32Z

On Fri, 14 Feb 2025 23:36:13 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> >
> > It's not supported. If you try it, it will crash. This prevents reading via
> > mmap() on a boot buffer. I don't know what you are asking. Once this patch
> > is applied, mmap() will always fail on the boot buffer before or after you
> > start it.
>
> Hmm, I meant it is supported for other non-persisten ring buffer, isn't it?

Correct. It is supported in other buffers, but it just isn't supported in
the persistent one.

This patch only disables mmap if it's trying to mmap a persistent one.

I guess I don't understand your concern.

-- Steve