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/3] libbpf: support non-mmap()'able data sections
Date: Tue, 18 Oct 2022 17:28:13 -0700 [thread overview]
Message-ID: <20221019002816.359650-1-andrii@kernel.org> (raw)
Make libbpf more conservative in using BPF_F_MMAPABLE flag with internal BPF
array maps that are backing global data sections. See patch #2 for full
description and justification.
Changes in this dataset support having bpf_spinlock, kptr, rb_tree nodes and
other "special" variables as global variables. Combining this with libbpf's
existing support for multiple custom .data.* sections allows BPF programs to
utilize multiple spinlock/rbtree_node/kptr variables in a pretty natural way
by just putting all such variables into separate data sections (and thus ARRAY
maps).
v1->v2:
- address Stanislav's feedback, adds acks.
Andrii Nakryiko (3):
libbpf: clean up and refactor BTF fixup step
libbpf: only add BPF_F_MMAPABLE flag for data maps with global vars
libbpf: add non-mmapable data section selftest
tools/lib/bpf/libbpf.c | 177 +++++++++++-------
.../selftests/bpf/prog_tests/skeleton.c | 11 +-
.../selftests/bpf/progs/test_skeleton.c | 17 ++
3 files changed, 139 insertions(+), 66 deletions(-)
--
2.30.2
next reply other threads:[~2022-10-19 0:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 0:28 Andrii Nakryiko [this message]
2022-10-19 0:28 ` [PATCH v2 bpf-next 1/3] libbpf: clean up and refactor BTF fixup step Andrii Nakryiko
2022-10-19 0:28 ` [PATCH v2 bpf-next 2/3] libbpf: only add BPF_F_MMAPABLE flag for data maps with global vars Andrii Nakryiko
2022-10-19 16:04 ` Dave Marchevsky
2022-10-19 0:28 ` [PATCH v2 bpf-next 3/3] libbpf: add non-mmapable data section selftest Andrii Nakryiko
2022-10-19 8:25 ` [PATCH v2 bpf-next 0/3] libbpf: support non-mmap()'able data sections Kumar Kartikeya Dwivedi
2022-10-19 23:50 ` patchwork-bot+netdevbpf
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=20221019002816.359650-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox