]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf trace: Increase syscall handler map size to 1024
authorNamhyung Kim <namhyung@kernel.org>
Mon, 19 May 2025 23:25:39 +0000 (16:25 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 31 Oct 2025 19:29:44 +0000 (12:29 -0700)
commit915c31f0e69255897225d244e04374082d36de7f
tree2375600da2d7081c391ca56b6da8619a8381cce8
parent0d1e63183d5ce63f7a57a99cbee1018f2a72d202
perf trace: Increase syscall handler map size to 1024

The syscalls_sys_{enter,exit} map in augmented_raw_syscalls.bpf.c has
max entries of 512.  Usually syscall numbers are smaller than this but
x86 has x32 ABI where syscalls start from 512.

That makes trace__init_syscalls_bpf_prog_array_maps() fail in the middle
of the loop when it accesses those keys.  As the loop iteration is not
ordered by syscall numbers anymore, the failure can affect non-x32
syscalls.

Let's increase the map size to 1024 so that it can handle those ABIs
too.  While most systems won't need this, increasing the size will be
safer for potential future changes.

Reviewed-by: Howard Chu <howardchu95@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c