[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-wpU6649BjlHZFU@kernel.org>
Date: Tue, 1 Apr 2025 20:58:43 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vincent Donnefort <vdonnefort@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>, Kees Cook <kees@...nel.org>,
Tony Luck <tony.luck@...el.com>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2 1/2] tracing: ring-buffer: Have the ring buffer code
do the vmap of physical memory
On Tue, Apr 01, 2025 at 11:54:23AM -0400, Steven Rostedt wrote:
> On Tue, 1 Apr 2025 18:26:43 +0300
> Mike Rapoport <rppt@...nel.org> wrote:
>
> > > But if I use vmap_page_range(), how do I give that back to the memory allocator?
> >
> > But you don't need neither vmap() nor vmap_page_range() to have kernel page
> > tables for memory that you get from reserve_mem. It's already mapped and
> > plain phys_to_virt() gives you the virtual address you can use.
>
> Oh! That makes things so much easier! Especially since that means it should
> work like the normal buffer where virt_to_page() should also work. Right?
Right.
> Now I do support mapping the persistent ring buffer via memmap, but I can
> just give up on allowing that to be memory mapped to user space, or even
> freed.
It can't be freed without jumping through some hoops, and mapping it to
user space is hassle as well.
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists