diff options
| author | Andrii Nakryiko <[email protected]> | 2022-06-27 21:15:26 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-06-28 20:13:33 +0000 |
| commit | bd054102a8c7f36ff03446cc41822601180241f3 (patch) | |
| tree | c6933c1c7cce03aabda6c10b93ca19408a802e86 /tools/lib/bpf/bpf.c | |
| parent | selftests/bpf: remove last tests with legacy BPF map definitions (diff) | |
| download | kernel-bd054102a8c7f36ff03446cc41822601180241f3.tar.gz kernel-bd054102a8c7f36ff03446cc41822601180241f3.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/lib/bpf/bpf.c')
| -rw-r--r-- | tools/lib/bpf/bpf.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 2f3495d80d69..6d848b02c1e0 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c @@ -147,10 +147,6 @@ int bump_rlimit_memlock(void) { struct rlimit rlim; - /* this the default in libbpf 1.0, but for now user has to opt-in explicitly */ - if (!(libbpf_mode & LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK)) - return 0; - /* if kernel supports memcg-based accounting, skip bumping RLIMIT_MEMLOCK */ if (memlock_bumped || kernel_supports(NULL, FEAT_MEMCG_ACCOUNT)) return 0; |
