summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2026-08-28 23:15:50 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-08-29 18:16:32 -0700
commitff08e6b79ee1470e736054e9558c47e4150406b1 (patch)
treecdc1686bb1372effb9fa533abcc0db5b02065db8 /tools/lib/python
parent282d07dc6c74a5b4eea19743dd8c487c4b8814da (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')
0 files changed, 0 insertions, 0 deletions