@@ -1815,8 +1815,7 @@ void bpf_free_kfunc_btf_tab(struct bpf_kfunc_btf_tab *tab)
1815
1815
kfree (tab );
1816
1816
}
1817
1817
1818
- static struct btf * find_kfunc_desc_btf (struct bpf_verifier_env * env ,
1819
- u32 func_id , s16 offset )
1818
+ static struct btf * find_kfunc_desc_btf (struct bpf_verifier_env * env , s16 offset )
1820
1819
{
1821
1820
if (offset ) {
1822
1821
if (offset < 0 ) {
@@ -1891,7 +1890,7 @@ static int add_kfunc_call(struct bpf_verifier_env *env, u32 func_id, s16 offset)
1891
1890
prog_aux -> kfunc_btf_tab = btf_tab ;
1892
1891
}
1893
1892
1894
- desc_btf = find_kfunc_desc_btf (env , func_id , offset );
1893
+ desc_btf = find_kfunc_desc_btf (env , offset );
1895
1894
if (IS_ERR (desc_btf )) {
1896
1895
verbose (env , "failed to find BTF for kernel function\n" );
1897
1896
return PTR_ERR (desc_btf );
@@ -2360,7 +2359,7 @@ static const char *disasm_kfunc_name(void *data, const struct bpf_insn *insn)
2360
2359
if (insn -> src_reg != BPF_PSEUDO_KFUNC_CALL )
2361
2360
return NULL ;
2362
2361
2363
- desc_btf = find_kfunc_desc_btf (data , insn -> imm , insn -> off );
2362
+ desc_btf = find_kfunc_desc_btf (data , insn -> off );
2364
2363
if (IS_ERR (desc_btf ))
2365
2364
return "<error>" ;
2366
2365
@@ -7237,7 +7236,7 @@ static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
7237
7236
if (!insn -> imm )
7238
7237
return 0 ;
7239
7238
7240
- desc_btf = find_kfunc_desc_btf (env , insn -> imm , insn -> off );
7239
+ desc_btf = find_kfunc_desc_btf (env , insn -> off );
7241
7240
if (IS_ERR (desc_btf ))
7242
7241
return PTR_ERR (desc_btf );
7243
7242
0 commit comments