libbpf: enforce strict libbpf 1.0 behaviors
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 27 Jun 2022 21:15:26 +0000 (14:15 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 28 Jun 2022 20:13:33 +0000 (13:13 -0700)
commitbd054102a8c7f36ff03446cc41822601180241f3
treec6933c1c7cce03aabda6c10b93ca19408a802e86
parent31e42721976b9c445477038f8a4006150cd27a60
libbpf: enforce strict libbpf 1.0 behaviors

Remove support for legacy features and behaviors that previously had to
be disabled by calling libbpf_set_strict_mode():
  - legacy BPF map definitions are not supported now;
  - RLIMIT_MEMLOCK auto-setting, if necessary, is always on (but see
    libbpf_set_memlock_rlim());
  - program name is used for program pinning (instead of section name);
  - cleaned up error returning logic;
  - entry BPF programs should have SEC() always.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220627211527.2245459-15-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf.c
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/lib/bpf/libbpf_internal.h
tools/lib/bpf/libbpf_legacy.h