summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2021-12-01 21:10:24 +0300
committerAndrii Nakryiko <andrii@kernel.org>2021-12-02 22:18:34 +0300
commit74753e1462e77349525daf9eb60ea21ed92d3a97 (patch)
treed467116b4c48106e4bd0cbaa04e6df823bcc2720 /kernel
parent64b5b97b8cfff64409fcc234ae3151bc8de0c4d6 (diff)
downloadlinux-74753e1462e77349525daf9eb60ea21ed92d3a97.tar.xz
libbpf: Replace btf__type_by_id() with btf_type_by_id().
To prepare relo_core.c to be compiled in the kernel and the user space replace btf__type_by_id with btf_type_by_id. In libbpf btf__type_by_id and btf_type_by_id have different behavior. bpf_core_apply_relo_insn() needs behavior of uapi btf__type_by_id vs internal btf_type_by_id, but type_id range check is already done in bpf_core_apply_relo(), so it's safe to replace it everywhere. The kernel btf_type_by_id() does the check anyway. It doesn't hurt. Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211201181040.23337-2-alexei.starovoitov@gmail.com
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions