diff options
| author | Yonghong Song <yonghong.song@linux.dev> | 2026-08-28 23:16:10 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-08-29 18:16:33 -0700 |
| commit | f7213961e8e24b3ed98b13406c06fcf91138ad2f (patch) | |
| tree | e0617e54306a0e1cc380a952c1a3a8853db6af45 /tools/lib/python/kdoc/python_version.py | |
| parent | 18bc6183884279b279026737b1fa7cc0517010bc (diff) | |
| download | linux-next-f7213961e8e24b3ed98b13406c06fcf91138ad2f.tar.gz linux-next-f7213961e8e24b3ed98b13406c06fcf91138ad2f.zip | |
selftests/bpf: Test kfuncs returning arena pointers by value
Cover the by-value struct returns a kfunc may now make: two arena
pointers filling R0:R2, and an arena pointer beside a scalar. Two further
cases drop the tag from one member of a struct and one arm of a union,
and stay rejected naming that member, so what decides is the tag rather
than the member being a pointer. The existing cases for a struct and a
nested struct carrying a plain pointer stay rejected as well.
These cases call the kfuncs from C, so the compiler lowers the by-value
return itself, and a struct or union only lands in R0:R2 with the LLVM 23
BPF ABI. An older clang, and gcc, return it through a hidden pointer in
R1 instead, which shifts the arguments along and fails verification. The
file is therefore guarded on LLVM 23, falling back to a dummy test.
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260829061610.1699950-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
