mbox series

[bpf-next,0/2] bpftool: Restore memlock rlimit bump

Message ID 20220610112648.29695-1-quentin@isovalent.com (mailing list archive)
Headers show
Series bpftool: Restore memlock rlimit bump | expand

Message

Quentin Monnet June 10, 2022, 11:26 a.m. UTC
We recently removed the uncondtional rlimit bump from bpftool, deferring it
to libbpf to probe the system for memcg-based memory accounting and to
raise the rlimit if necessary.

This probing is based on the availability of a given BPF helper, and his
known to fail on some environments where the helper, but not the memcg
memory accounting, has been backported.

To work around this, this set restores the memlock rlimit bump in bpftool.
Please see the description of the first patch for more details.

Quentin Monnet (2):
  Revert "bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK"
  bpftool: Do not check return value from libbpf_set_strict_mode()

 tools/bpf/bpftool/common.c     | 8 ++++++++
 tools/bpf/bpftool/feature.c    | 2 ++
 tools/bpf/bpftool/main.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 ++
 8 files changed, 20 insertions(+), 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org June 14, 2022, 8:37 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Fri, 10 Jun 2022 12:26:46 +0100 you wrote:
> We recently removed the uncondtional rlimit bump from bpftool, deferring it
> to libbpf to probe the system for memcg-based memory accounting and to
> raise the rlimit if necessary.
> 
> This probing is based on the availability of a given BPF helper, and his
> known to fail on some environments where the helper, but not the memcg
> memory accounting, has been backported.
> 
> [...]

Here is the summary with links:
  - [bpf-next,1/2] Revert "bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK"
    https://git.kernel.org/bpf/bpf-next/c/6b4384ff1088
  - [bpf-next,2/2] bpftool: Do not check return value from libbpf_set_strict_mode()
    https://git.kernel.org/bpf/bpf-next/c/93270357daa9

You are awesome, thank you!