Re: [PATCH] perf iostat: Reject incomplete and out-of-range port strings
From: Namhyung Kim
Date: Mon Nov 09 2026 - 21:57:44 EST
On Fri, 06 Nov 2026 10:20:27 +0800, lirongqing wrote:
> The root port regular expression accepts trailing characters and an
> unbounded domain field. A nine-digit domain matches it but makes the
> subsequent width-limited sscanf() stop before the bus. The parser still
> returns success, allowing the filter to use an uninitialized or stale
> bus value. A three-digit bus is silently truncated as well.
>
> Match the complete notation within the documented domain and bus widths.
> Check regular expression compilation and propagate conversion failures
> instead of treating a warning as successful parsing.
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung