]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Reject static entry-point BPF programs
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 14 May 2021 19:55:34 +0000 (12:55 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 14 May 2021 23:11:09 +0000 (16:11 -0700)
commita81f0a81b1f979c8987e8e61decfaaa64bde90b0
treeca3ca0fd649d3f588092f24b90f83acc8c2dbb6f
parent3fddaf0136f3e94a6d3845fe59814e35011ee1f4
libbpf: Reject static entry-point BPF programs

Detect use of static entry-point BPF programs (those with SEC() markings) and
emit error message. This is similar to
3fddaf0136f3 ("libbpf: Reject static maps") but for BPF programs.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210514195534.1440970-1-andrii@kernel.org
tools/lib/bpf/libbpf.c