Re: [PATCH] perf trace: Increase syscall handler map size to 1024

From: Howard Chu
Date: Mon May 19 2025 - 19:36:45 EST


Hello Namhyung,

On Mon, May 19, 2025 at 4:25 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> 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.
>
> Cc: Howard Chu <howardchu95@xxxxxxxxx>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Reviewed-by: Howard Chu <howardchu95@xxxxxxxxx>

Thanks,
Howard