]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Add BTF repeated field count overflow test
authorPaul Moses <p@1g4.org>
Tue, 9 Jun 2026 10:08:54 +0000 (05:08 -0500)
committerKumar Kartikeya Dwivedi <memxor@gmail.com>
Tue, 9 Jun 2026 15:00:05 +0000 (17:00 +0200)
commitdd0f9684d2f7d3f99aee63f5fa80562f2207b964
treeeffd2772ec1a6ec1755abddc12c304ccbf3b191c
parentb9452b594fd3aecbfd4aa0a6a1f741330a37dab7
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@1g4.org>
Link: https://lore.kernel.org/bpf/SzebdWqm2zREZBf8Tc5Kc-JDWbh9nBztnk4PUu5kRSD1OOdr_ESVTt__2Hd3-lClr47jIjJCXfOH0RHsMpjjpEUh_R2v30nh3T1IXNT6Pbo=@1g4.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
tools/testing/selftests/bpf/prog_tests/btf.c