diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2026-08-29 18:16:33 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-08-29 18:16:34 -0700 |
| commit | 6ae934b5b799446b58f327d723b4acd3178e9330 (patch) | |
| tree | 7e8d0f471fe5660060f877cb6e68ccc2c5f3ef33 /tools/lib/python/kdoc/python_version.py | |
| parent | cd35e1b10182c42b4ae31ee49119463b17d8ba7f (diff) | |
| parent | 25b0d73a7742d7415156c607f6278682efc12fc2 (diff) | |
| download | linux-next-6ae934b5b799446b58f327d723b4acd3178e9330.tar.gz linux-next-6ae934b5b799446b58f327d723b4acd3178e9330.zip | |
Merge branch 'bpf-allow-arena-pointers-in-by-value-returns'
Yonghong Song says:
====================
bpf: Allow arena pointers in by-value returns
A function returning a struct by value may only return one whose members
are all scalars. That is stricter than it needs to be: an arena pointer
is safe to hand over as raw register bits, and both a global function
and a kfunc can already return one on its own.
This patch set allows returning arena pointer(s) (as member(s) of a
struct) for global functions and kfuncs. Any other pointer member stays
rejected, as it would be laundered into a scalar and escape provenance
and reference tracking.
Patch 1 fixes a diagnostics bug. Patches 2-4 are refactoring with no
functional change. Patch 5 checked (nested) arrays until non-array type
to be checked by struct or other types. Patch 6 improves the diagnostics
for an unsupported return type, and patches 7-8 allow arena pointer members.
Patches 9-11 are selftests. Patch 12 updates the kfunc's doc.
Changelog:
v3 -> v4:
- v3: https://lore.kernel.org/bpf/20260827061114.2514603-1-yonghong.song@linux.dev/
- Generate type string(s) for those verifier rejected kfunc's.
- For global function, disable returning arena pointer if main prog.
- Add additional tests for rejected kfunc type string(s).
v2 -> v3:
- v2: https://lore.kernel.org/bpf/20260825205412.1320099-1-yonghong.song@linux.dev/
- Fix two more verifier diagnostics.
- Fix btf_member_path_str() by detecting anonymous union/struct.
- Fix a few arena tests with non-zero arena pointers.
- Update kfuncs doc for supporting return value with arena pointers.
v1 -> v2:
- v1: https://lore.kernel.org/bpf/20260824144943.991316-1-yonghong.song@linux.dev/
- Add nested struct field names for diagnostics, and report the
nesting depth for a type nested past the walk limit.
- Allow to return arena pointers for global functions and kfuncs.
- Necessary selftests for newly supported arena pointers.
====================
Link: https://patch.msgid.link/20260829061514.1690730-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
