Re: [PATCH bpf] selftests/bpf: Add BTF repeated field count overflow test
From: Eduard Zingerman
Date: Tue Jun 09 2026 - 13:20:53 EST
On Tue, 2026-06-09 at 11:37 +0000, Paul Moses wrote:
> From 7129e266643883a4f83e65fce3ce20c7f7269fb3 Mon Sep 17 00:00:00 2001
> From: Paul Moses <p@xxxxxxx>
> Date: Tue, 9 Jun 2026 05:08:54 -0500
> Subject: [PATCH bpf] selftests/bpf: Add BTF repeated field count overflow test
>
> Add a raw BTF test that exercises repeated special-field expansion with a
> large array count. The compact element layout keeps the array byte size
> representable while the repeated field count overflows the old u32 capacity
> calculation in btf_repeat_fields().
>
> Signed-off-by: Paul Moses <p@xxxxxxx>
> ---
Note that this selftest is depending on a fix:
https://lore.kernel.org/bpf/DJ4DWMO4HXCM.3NVLDGNT2704E@xxxxxxxxx/T/#t
W/o the fix KASAN warning is reported when executing the test.
Tested-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
[...]