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 bpf-next 0/3] libbpf: support non-mmap()'able data sections
Date: Mon, 17 Oct 2022 20:56:43 -0700 [thread overview]
Message-ID: <20221018035646.1294873-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).
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 | 176 +++++++++++-------
.../selftests/bpf/prog_tests/skeleton.c | 11 +-
.../selftests/bpf/progs/test_skeleton.c | 17 ++
3 files changed, 138 insertions(+), 66 deletions(-)
--
2.30.2
next reply other threads:[~2022-10-18 3:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 3:56 Andrii Nakryiko [this message]
2022-10-18 3:56 ` [PATCH bpf-next 1/3] libbpf: clean up and refactor BTF fixup step Andrii Nakryiko
2022-10-18 18:47 ` sdf
2022-10-18 23:18 ` Andrii Nakryiko
2022-10-19 0:15 ` Stanislav Fomichev
2022-10-18 3:56 ` [PATCH bpf-next 2/3] libbpf: only add BPF_F_MMAPABLE flag for data maps with global vars Andrii Nakryiko
2022-10-18 18:52 ` sdf
2022-10-18 23:20 ` Andrii Nakryiko
2022-10-18 3:56 ` [PATCH bpf-next 3/3] libbpf: add non-mmapable data section selftest Andrii Nakryiko
2022-10-18 18:55 ` sdf
2022-10-18 20:56 ` Dave Marchevsky
2022-10-18 21:02 ` Dave Marchevsky
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=20221018035646.1294873-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