Re: [PATCH bpf-next v2 30/35] bpf: bpftool: do not touch RLIMIT_MEMLOCK

From: Andrii Nakryiko
Date: Tue Jul 28 2020 - 02:00:57 EST


On Mon, Jul 27, 2020 at 12:21 PM Roman Gushchin <guro@xxxxxx> wrote:
>
> Since bpf stopped using memlock rlimit to limit the memory usage,
> there is no more reason for bpftool to alter its own limits.
>
> Signed-off-by: Roman Gushchin <guro@xxxxxx>
> ---

This can't be removed either, due to old kernel support. We probably
should have a helper function to probe RLIMIT_MEMLOCK use by BPF
subsystem, though, and not call set_max_rlimit() is not necessary.

> tools/bpf/bpftool/common.c | 7 -------
> tools/bpf/bpftool/feature.c | 2 --
> tools/bpf/bpftool/main.h | 2 --
> tools/bpf/bpftool/map.c | 2 --
> tools/bpf/bpftool/pids.c | 1 -
> tools/bpf/bpftool/prog.c | 3 ---
> tools/bpf/bpftool/struct_ops.c | 2 --
> 7 files changed, 19 deletions(-)
>

[...]