perf pmu: Switch FILENAME_MAX to NAME_MAX
authorIan Rogers <irogers@google.com>
Thu, 17 Jul 2025 15:08:54 +0000 (08:08 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 23 Jul 2025 01:17:53 +0000 (18:17 -0700)
commit82aac553372cd201b91a8b064be0cd5a501932b2
tree0ae10b066a5b344bf0a9c45d0376fce57fa9cf9c
parent478272d1cdd9959a6d638e9d81f70642f04290c9
perf pmu: Switch FILENAME_MAX to NAME_MAX

FILENAME_MAX is the same as PATH_MAX (4kb) in glibc rather than
NAME_MAX's 255. Switch to using NAME_MAX and ensure the '\0' is
accounted for in the path's buffer size.

Fixes: 754baf426e09 ("perf pmu: Change aliases from list to hashmap")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250717150855.1032526-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/pmu.c