Re: [PATCH v2 1/2] tracing: ring-buffer: Have the ring buffer code do the vmap of physical memory

From: Linus Torvalds
Date: Thu Apr 03 2025 - 12:52:31 EST


On Thu, 3 Apr 2025 at 09:45, Kees Cook <kees@xxxxxxxxxx> wrote:
>
> pstore tries to work with either real RAM or with iomem things. What
> is there now Currently Works Fine, but should this be using
> vmap_page_range()?

Yes, I don't see the point of using vmap() on something that is
contiguous but is made to look like a collection of random pfns.

IOW, that whole 'pages[]' array (and the kmalloc/kfree) seems pointless.

I *suspect* the history is simply that 'vmap()' predates 'vmap_page_range()'.

But maybe I'm missing something, and there is some limitation to
vmap_page_range() that I'm not seeing.

Linus