public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/3] libbpf: support non-mmap()'able data sections
@ 2022-10-19  0:28 Andrii Nakryiko
  2022-10-19  0:28 ` [PATCH v2 bpf-next 1/3] libbpf: clean up and refactor BTF fixup step Andrii Nakryiko
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Andrii Nakryiko @ 2022-10-19  0:28 UTC (permalink / raw)
  To: bpf, ast, daniel; +Cc: andrii, kernel-team

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-19 23:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19  0:28 [PATCH v2 bpf-next 0/3] libbpf: support non-mmap()'able data sections Andrii Nakryiko
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox