On Wed, 2 Apr 2025 13:03:37 -0400
Steven Rostedt <[email protected]> wrote:
> That also means all the tricks to determine where the page in the ring
> buffer came from can go away.
I wonder, just to be safe, if I should add in the ring buffer mapping code:
/* If the buffer is not part of the normal memory, do not allow mapping
*/
if (!virt_addr_valid(cpu_buffer->reader_page->page))
return -ENODEV;
?
As the buffer can come from anywhere, but we only allow a memory mapping to
user space if the buffer is from the normal memory allocator.
Currently, this patch series has the caller (the tracing code) prevent
allowing memmap to be user mapped. Perhaps the above should include a
WARN_ON_ONCE()?
-- Steve