linux/tools/lib/perf/include/internal
Ian Rogers 83c338369a libperf cpumap: Make index and nr types unsigned
The index into the cpumap array and the number of entries within the
array can never be negative, so let's make them unsigned. This is
prompted by reports that gcc 13 with -O6 is giving a
alloc-size-larger-than errors. The change makes the cpumap changes and
then updates the declaration of index variables throughout perf and
libperf to be unsigned. The two things are hard to separate as
compiler warnings about mixing signed and unsigned types breaks the
build.

Reported-by: Chingbin Li <liqb365@163.com>
Closes: https://lore.kernel.org/lkml/20260212025127.841090-1-liqb365@163.com/
Tested-by: Chingbin Li <liqb365@163.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2026-04-01 14:50:53 -07:00
..
cpumap.h libperf cpumap: Make index and nr types unsigned 2026-04-01 14:50:53 -07:00
evlist.h libperf evlist: Avoid out-of-bounds access 2024-02-29 13:57:02 -08:00
evsel.h perf evlist: Special map propagation for tool events that read on 1 CPU 2026-02-10 09:33:28 -03:00
lib.h libperf: Add preadn() 2022-05-23 10:11:12 -03:00
mmap.h libperf: Lazily allocate/size mmap event copy 2023-11-30 19:25:19 -03:00
rc_check.h libperf rc_check: Add RC_CHK_EQUAL 2023-10-25 13:37:22 -07:00
tests.h libperf tests: Fix verbose printing 2021-08-24 15:05:35 -03:00
threadmap.h
xyarray.h libperf xyarray: Add bounds checks to xyarray__entry() 2021-04-20 08:11:33 -03:00