summaryrefslogtreecommitdiff
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-10-11 00:17:30 +0300
committerAlexei Starovoitov <ast@kernel.org>2024-10-11 21:15:45 +0300
commitdb089c9158c1d535a36dfc010e5db37fccea2561 (patch)
tree5230b1d6b37a0eb01a305e1bcf1a23a76e29ea2d /kernel/bpf/arraymap.c
parent59972544bd2261296f191cc2585de5934b9143be (diff)
downloadlinux-db089c9158c1d535a36dfc010e5db37fccea2561.tar.xz
libbpf: never interpret subprogs in .text as entry programs
Libbpf pre-1.0 had a legacy logic of allowing singular non-annotated (i.e., not having explicit SEC() annotation) function to be treated as sole entry BPF program (unless there were other explicit entry programs). This behavior was dropped during libbpf 1.0 transition period (unless LIBBPF_STRICT_SEC_NAME flag was unset in libbpf_mode). When 1.0 was released and all the legacy behavior was removed, the bug slipped through leaving this legacy behavior around. Fix this for good, as it actually causes very confusing behavior if BPF object file only has subprograms, but no entry programs. Fixes: bd054102a8c7 ("libbpf: enforce strict libbpf 1.0 behaviors") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20241010211731.4121837-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions