diff options
| author | Jiayuan Chen <jiayuan.chen@linux.dev> | 2026-09-10 20:22:56 +0800 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-09-10 16:58:05 -0700 |
| commit | f77d21245710690f3fb02d19d8dd4dc17ee58c2c (patch) | |
| tree | d4ca8d20b17125004aa17f9cb6f18fd3c147de78 /tools/perf/scripts/python | |
| parent | b0b3dc66529676228cb938cbcad66920f735c223 (diff) | |
| download | linux-next-f77d21245710690f3fb02d19d8dd4dc17ee58c2c.tar.gz linux-next-f77d21245710690f3fb02d19d8dd4dc17ee58c2c.zip | |
selftests/bpf: Test BTF walk into a flexible array of zero-sized elements
The program stashes a bpf_obj_new() object whose type ends with a flexible
array of empty structs, then reads it back as an untrusted kptr. Without
the previous patch this divides by zero in btf_struct_walk() instead of
being rejected.
# ./test_progs -t verifier_btf_flex_array
...
#602 verifier_btf_flex_array:OK
Summary: 1/1 PASSED, 0 SKIPPED, 0/0 FAILED
Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Link: https://lore.kernel.org/r/20260910122316.186384-2-jiayuan.chen@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
