diff options
author | Alexei Starovoitov <[email protected]> | 2023-03-17 13:19:18 -0700 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2023-03-17 15:44:27 -0700 |
commit | 5fc13ad59b60708e52932188854d4d5bf2b0e10e (patch) | |
tree | ee91e7c2bd0e4a922d7e5a0f98f0886f2c9c8eda /tools/lib/bpf/bpf_helpers.h | |
parent | 58aa2afbb1e61fcf35bfcc819952a3c13d9f9203 (diff) |
libbpf: Fix relocation of kfunc ksym in ld_imm64 insn.
void *p = kfunc; -> generates ld_imm64 insn.
kfunc() -> generates bpf_call insn.
libbpf patches bpf_call insn correctly while only btf_id part of ld_imm64 is
set in the former case. Which means that pointers to kfuncs in modules are not
patched correctly and the verifier rejects load of such programs due to btf_id
being out of range. Fix libbpf to patch ld_imm64 for kfunc.
Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf_helpers.h')
0 files changed, 0 insertions, 0 deletions