diff options
| author | Nicholas Dudar <main.kalliope@gmail.com> | 2026-07-09 11:58:37 -0400 |
|---|---|---|
| committer | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-07-09 22:21:45 +0200 |
| commit | 12556c3198328df38b3444978391141ad6f7092b (patch) | |
| tree | 9b59b770e7b10f98e483d06401b4292a518097f5 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 2aaf67f0516fde29620d0edfc29c01b9ea7ad430 (diff) | |
selftests/bpf: Add test for oversized rdonly/rdwr_buf_size kfunc argument
Add a load-failure test to the kfunc_call suite using the existing
bpf_kfunc_call_test_get_rdwr_mem() test kfunc. Its rdwr_buf_size
argument is a const int, so the test uses a 64-bit immediate load in
inline asm to place 2^64 - 192 (0xffffffffffffff40) in the argument
register. The verifier records r0_size from the full 64-bit register
value, and the test asserts that BPF_PROG_LOAD rejects it with
"rdonly/rdwr_buf_size exceeds u32 max".
Signed-off-by: Nicholas Dudar <main.kalliope@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20260709155837.1879230-3-main.kalliope@gmail.com
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
