From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>
Subject: [PATCH v2 bpf-next 0/2] libbpf: auto-bumpd RLIMIT_MEMLOCK on old kernels
Date: Fri, 10 Dec 2021 12:13:31 -0800 [thread overview]
Message-ID: <20211210201333.896276-1-andrii@kernel.org> (raw)
Make libbpf bump RLIMIT_MEMLOCK, similarly to BCC, if kernel is old enough to
use memcg-based memory accounting for BPF. Patch #2 drops explicit
setrlimi(RLIMIT_MEMLOCK) calls in test_progs, test_maps, and test_verifier.
v1->v2:
- fix up out-of-sync comments (Toke).
Andrii Nakryiko (2):
libbpf: auto-bump RLIMIT_MEMLOCK if kernel needs it for BPF
selftests/bpf: remove explicit setrlimit(RLIMIT_MEMLOCK) in main
selftests
tools/lib/bpf/bpf.c | 121 ++++++++++++++++++
tools/lib/bpf/bpf.h | 2 +
tools/lib/bpf/libbpf.c | 47 ++-----
tools/lib/bpf/libbpf.map | 1 +
tools/lib/bpf/libbpf_internal.h | 39 ++++++
tools/lib/bpf/libbpf_legacy.h | 12 +-
tools/testing/selftests/bpf/bench.c | 16 ---
tools/testing/selftests/bpf/prog_tests/btf.c | 1 -
.../bpf/prog_tests/select_reuseport.c | 1 -
.../selftests/bpf/prog_tests/sk_lookup.c | 1 -
.../selftests/bpf/prog_tests/sock_fields.c | 1 -
tools/testing/selftests/bpf/test_maps.c | 1 -
tools/testing/selftests/bpf/test_progs.c | 2 -
tools/testing/selftests/bpf/test_verifier.c | 4 +-
14 files changed, 186 insertions(+), 63 deletions(-)
--
2.30.2
next reply other threads:[~2021-12-10 20:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 20:13 Andrii Nakryiko [this message]
2021-12-10 20:13 ` [PATCH v2 bpf-next 1/2] libbpf: auto-bump RLIMIT_MEMLOCK if kernel needs it for BPF Andrii Nakryiko
2021-12-11 19:36 ` Toke Høiland-Jørgensen
2021-12-12 2:22 ` Alexei Starovoitov
2021-12-12 19:45 ` Andrii Nakryiko
2021-12-10 20:13 ` [PATCH v2 bpf-next 2/2] selftests/bpf: remove explicit setrlimit(RLIMIT_MEMLOCK) in main selftests Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211210201333.896276-1-andrii@kernel.org \
--to=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.