diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2026-10-02 12:47:06 +0000 |
|---|---|---|
| committer | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-10-03 16:08:17 +0200 |
| commit | 8e1b3e0945a6fa51c72339898d84fba9f0464b41 (patch) | |
| tree | c89077212d1a98d38991bbfa15e249d186703ad4 /include/linux/timerqueue.h | |
| parent | 711d8a75c507cb843b4f73278d1f975bf15b11c8 (diff) | |
| download | linux-next-8e1b3e0945a6fa51c72339898d84fba9f0464b41.tar.gz linux-next-8e1b3e0945a6fa51c72339898d84fba9f0464b41.zip | |
bpf: Allow arguments without names in static functions in BTF
Some static functions in BTF of a Rust program have arguments without
names:
[71] FUNC_PROTO '(anon)' ret_type_id=0 vlen=1
'(anon)' type_id=72
[81] FUNC 'unwrap_failed' type_id=71 linkage=static
and the kernel rejects such BTF with "Invalid arg#1". It's 5 of 25
static functions in scx_cosmos and 6 of 24 in scx_simple.
The verifier looks at types of the arguments. The names are printed only,
as "(anon)" when there is none. Allow such static FUNC. Global functions
are checked as before.
The test "func (Some arg has no name)" in prog_tests/btf.c has a static
function. Make it global to keep the check.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20261002124714.180012-8-alexei.starovoitov@gmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
