All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rfc v3 bpf-next 0/9] BPF support for global data
@ 2019-03-11 21:51 Daniel Borkmann
  2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 1/9] bpf: implement lookup-free direct value access for maps Daniel Borkmann
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Daniel Borkmann @ 2019-03-11 21:51 UTC (permalink / raw)
  To: ast
  Cc: bpf, netdev, joe, john.fastabend, yhs, andrii.nakryiko,
	jakub.kicinski, tgraf, lmb, Daniel Borkmann

This series is a major rework of previously submitted libbpf
patches [0] in order to add global data support for BPF. The
kernel has been extended to add proper infrastructure that allows
for full .bss/.data/.rodata sections on BPF loader side based
upon feedback from LPC discussions [1]. Latter support is then
also added into libbpf in this series which allows for more
natural C-like programming of BPF programs. For more information
on loader, please refer to 'bpf, libbpf: support global data/bss/
rodata sections' patch in this series. Joint work with Joe Stringer.

Thanks a lot!

Note, since merge window is still open, sending as rfc to dump
current progress I have from last v2 series, final v3 will go
out once bpf-next is open again.

  v2 -> rfc v3:
   - Add index selection into ldimm64 (Andrii)
   - Fix missing fdput() (Jann)
   - Reject invalid flags in BPF_F_*_PROG (Jakub)
   - Complete rework of libbpf support, includes:
    - Add objname to map name (Stanislav)
    - Make .rodata map full read-only after setup (Andrii)
    - Merge relocation handling into single one (Andrii)
    - Store global maps into obj->maps array (Andrii, Alexei)
    - Debug message when skipping section (Andrii)
    - Reject non-static global data till we have
      semantics for sharing them (Yonghong, Andrii, Alexei)
    - More test cases and completely reworked prog test (Alexei)
   - Fixes, cleanups, etc all over the set
   - Not yet addressed:
    - Make BTF mandatory for these maps (Alexei)
    -> Waiting till BTF support for these lands first
  v1 -> v2:
    - Instead of 32-bit static data, implement full global
      data support (Alexei)

  [0] https://patchwork.ozlabs.org/cover/1040290/
  [1] http://vger.kernel.org/lpc-bpf2018.html#session-3

Daniel Borkmann (7):
  bpf: implement lookup-free direct value access for maps
  bpf: add program side {rd,wr}only support for maps
  bpf: add syscall side map lock support
  bpf, obj: allow . char as part of the name
  bpf: sync bpf.h uapi header from tools infrastructure
  bpf, libbpf: support global data/bss/rodata sections
  bpf, selftest: test {rd,wr}only flags and direct value access

Joe Stringer (2):
  bpf, libbpf: refactor relocation handling
  bpf, selftest: test global data/bss/rodata sections

 include/linux/bpf.h                           |  35 +-
 include/linux/bpf_verifier.h                  |   4 +
 include/uapi/linux/bpf.h                      |  24 +-
 kernel/bpf/arraymap.c                         |  32 +-
 kernel/bpf/core.c                             |   3 +-
 kernel/bpf/disasm.c                           |   5 +-
 kernel/bpf/hashtab.c                          |   6 +-
 kernel/bpf/local_storage.c                    |   6 +-
 kernel/bpf/lpm_trie.c                         |   3 +-
 kernel/bpf/queue_stack_maps.c                 |   6 +-
 kernel/bpf/syscall.c                          | 111 ++++-
 kernel/bpf/verifier.c                         | 155 +++++--
 tools/bpf/bpftool/xlated_dumper.c             |   6 +
 tools/include/linux/filter.h                  |  14 +
 tools/include/uapi/linux/bpf.h                |  24 +-
 tools/lib/bpf/bpf.c                           |  10 +
 tools/lib/bpf/bpf.h                           |   1 +
 tools/lib/bpf/libbpf.c                        | 378 ++++++++++++++----
 tools/lib/bpf/libbpf.h                        |   1 +
 tools/lib/bpf/libbpf.map                      |   6 +
 tools/testing/selftests/bpf/bpf_helpers.h     |   8 +-
 .../selftests/bpf/prog_tests/global_data.c    | 157 ++++++++
 .../selftests/bpf/progs/test_global_data.c    | 106 +++++
 tools/testing/selftests/bpf/test_verifier.c   |  42 +-
 .../selftests/bpf/verifier/array_access.c     | 159 ++++++++
 .../bpf/verifier/direct_value_access.c        | 226 +++++++++++
 26 files changed, 1382 insertions(+), 146 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/global_data.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_global_data.c
 create mode 100644 tools/testing/selftests/bpf/verifier/direct_value_access.c

-- 
2.17.1


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

end of thread, other threads:[~2019-03-19 18:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 21:51 [PATCH rfc v3 bpf-next 0/9] BPF support for global data Daniel Borkmann
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 1/9] bpf: implement lookup-free direct value access for maps Daniel Borkmann
2019-03-14 18:11   ` Andrii Nakryiko
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 2/9] bpf: add program side {rd,wr}only support " Daniel Borkmann
2019-03-11 23:06   ` Alexei Starovoitov
2019-03-11 23:34     ` Daniel Borkmann
2019-03-14 19:27     ` Andrii Nakryiko
2019-03-14 19:26   ` Andrii Nakryiko
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 3/9] bpf: add syscall side map lock support Daniel Borkmann
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 4/9] bpf, obj: allow . char as part of the name Daniel Borkmann
2019-03-14 19:40   ` Andrii Nakryiko
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 5/9] bpf: sync bpf.h uapi header from tools infrastructure Daniel Borkmann
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 6/9] bpf, libbpf: refactor relocation handling Daniel Borkmann
2019-03-14 21:05   ` Andrii Nakryiko
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 7/9] bpf, libbpf: support global data/bss/rodata sections Daniel Borkmann
2019-03-14 22:14   ` Andrii Nakryiko
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 8/9] bpf, selftest: test {rd,wr}only flags and direct value access Daniel Borkmann
2019-03-19 18:18   ` Andrii Nakryiko
2019-03-11 21:51 ` [PATCH rfc v3 bpf-next 9/9] bpf, selftest: test global data/bss/rodata sections Daniel Borkmann
2019-03-19 18:28   ` Andrii Nakryiko

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.