diff options
| author | Yonghong Song <yonghong.song@linux.dev> | 2026-08-28 23:15:50 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-08-29 18:16:32 -0700 |
| commit | ff08e6b79ee1470e736054e9558c47e4150406b1 (patch) | |
| tree | cdc1686bb1372effb9fa533abcc0db5b02065db8 /tools/lib/python/kdoc/python_version.py | |
| parent | 282d07dc6c74a5b4eea19743dd8c487c4b8814da (diff) | |
bpf: Allow a global function to return arena pointers by value
A global function may already return an arena pointer on its own, and
check_global_ret_scalar_reg() accepts one in either half of the R0:R2
pair. Let the members of a by-value struct it returns be arena pointers
as well, rather than scalars only.
Only a subprogram gets this: the main program returns to the kernel,
which has no arena to cast the address back into, so
btf_validate_return_type() keeps rejecting an arena pointer there,
whether bare or inside a struct. The rejection message therefore has to
name what the function at hand may return, or it would offer the main
program an arena pointer it cannot have.
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260829061550.1696869-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
