aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core/sock_map.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2023-03-19 13:30:13 -0700
committerAndrii Nakryiko <andrii@kernel.org>2023-03-20 09:26:41 -0700
commita506d6ce1dd184051037dc9d26c3eb187c9fe625 (patch)
tree019291a229503abb3a262f08df214305e2212f68 /net/core/sock_map.c
parentbpf, docs: Libbpf overview documentation (diff)
downloadwireguard-linux-a506d6ce1dd184051037dc9d26c3eb187c9fe625.tar.xz
wireguard-linux-a506d6ce1dd184051037dc9d26c3eb187c9fe625.zip
libbpf: Fix ld_imm64 copy logic for ksym in light skeleton.
Unlike normal libbpf the light skeleton 'loader' program is doing btf_find_by_name_kind() call at run-time to find ksym in the kernel and populate its {btf_id, btf_obj_fd} pair in ld_imm64 insn. To avoid doing the search multiple times for the same ksym it remembers the first patched ld_imm64 insn and copies {btf_id, btf_obj_fd} from it into subsequent ld_imm64 insn. Fix a bug in copying logic, since it may incorrectly clear BPF_PSEUDO_BTF_ID flag. Also replace always true if (btf_obj_fd >= 0) check with unconditional JMP_JA to clarify the code. Fixes: d995816b77eb ("libbpf: Avoid reload of imm for weak, unresolved, repeating ksym") Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20230319203014.55866-1-alexei.starovoitov@gmail.com
Diffstat (limited to 'net/core/sock_map.c')
0 files changed, 0 insertions, 0 deletions