diff options
| author | Yafang Shao <[email protected]> | 2022-04-09 12:59:57 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2022-04-11 03:17:16 +0000 |
| commit | a777e18f1bcd32528ff5dfd10a6629b655b05eb8 (patch) | |
| tree | 681ae396647ca9e5cb2d977f135e365d4a226c12 /tools/bpf/bpftool/prog.c | |
| parent | selftests/bpf: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK (diff) | |
| download | kernel-a777e18f1bcd32528ff5dfd10a6629b655b05eb8.tar.gz kernel-a777e18f1bcd32528ff5dfd10a6629b655b05eb8.zip | |
bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK
We have switched to memcg-based memory accouting and thus the rlimit is
not needed any more. LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK was introduced in
libbpf for backward compatibility, so we can use it instead now.
libbpf_set_strict_mode always return 0, so we don't need to check whether
the return value is 0 or not.
Signed-off-by: Yafang Shao <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
| -rw-r--r-- | tools/bpf/bpftool/prog.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 8643b37d4e43..5c2c63df92e8 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -1604,8 +1604,6 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) } } - set_max_rlimit(); - if (verifier_logs) /* log_level1 + log_level2 + stats, but not stable UAPI */ open_opts.kernel_log_level = 1 + 2 + 4; @@ -2303,7 +2301,6 @@ static int do_profile(int argc, char **argv) } } - set_max_rlimit(); err = profiler_bpf__load(profile_obj); if (err) { p_err("failed to load profile_obj"); |
