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

From: Namhyung Kim

Date: Thu Aug 06 2026 - 12:18:11 EST


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