Re: [PATCH v7 0/5] perf: Fix and optimize maps parsing, boundaries, and bounds safety

Namhyung Kim <[email protected]> Thu, 06 Aug 2026 09:17:41 -0700
Newsgroups org.kernel.vger.linux-perf-users,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 21 Jul 2026 16:52:49 -0700, Ian Rogers wrote:
> It turns out that PATH_MAX is respected by system calls but isn't
> respected by file paths in /proc/pid/maps and /proc/pid/smaps. In the
> kernel "//toolong" is placed in the filename of mmap/mmap2 events
> where the filename is longer than PATH_MAX, do the same in the
> mmap/mmap2 synthesis code to avoid overrunning the event buffer -
> note, the filename buffer is bounds checked but this makes the
> synthesis more similar to the kernel approach. With Gemini's help try
> to address other correctness and overrun issues.
> 
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung