diff options
| author | Yonghong Song <yonghong.song@linux.dev> | 2026-08-18 22:53:30 -0700 |
|---|---|---|
| committer | Eduard Zingerman <eddyz87@gmail.com> | 2026-08-21 10:49:28 -0700 |
| commit | d50d9a06c86a76e800071d184d05c9cdbfa1ec4b (patch) | |
| tree | 4971425c2403208d1f43329875736ec5cb5eed68 /scripts/Makefile.thinlto | |
| parent | 0b9fc795f83f5831de858d659de1097800ba7f18 (diff) | |
| download | linux-next-d50d9a06c86a76e800071d184d05c9cdbfa1ec4b.tar.gz linux-next-d50d9a06c86a76e800071d184d05c9cdbfa1ec4b.zip | |
Documentation/bpf: Document up to 16-byte kfunc return values in R0: R2
kfuncs may now return a value larger than 8 bytes and up to 16 bytes (a
scalar-only struct or union, or an __int128), passed back in the R0:R2
register pair. Add a kfunc return-value section documenting this,
including that a struct or union up to 8 bytes is returned in R0 alone,
which struct and union members are accepted, that the R0:R2 register pair
requires JIT support (bpf_jit_supports_kfunc_ret_reg_pair()), and that a
return value larger than 16 bytes is unsupported.
Also note that the same convention applies to BPF subprogram returns, and
document the consequence for a global subprogram: it must assign both
halves of a register-pair return, since an unassigned R2 may be left
holding a pointer argument and is then rejected as a leak.
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://patch.msgid.link/20260819055330.3301120-1-yonghong.song@linux.dev
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
