netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bpf-next V2 PATCH 0/5] tools/libbpf improvements and selftests
@ 2018-02-06 14:54 Jesper Dangaard Brouer
  2018-02-06 14:54 ` [bpf-next V2 PATCH 1/5] bpf: Sync kernel ABI header with tooling header for bpf_common.h Jesper Dangaard Brouer
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Jesper Dangaard Brouer @ 2018-02-06 14:54 UTC (permalink / raw)
  To: netdev, Daniel Borkmann, Alexei Starovoitov, wangnan0
  Cc: jakub.kicinski, joe, acme, eric, Jesper Dangaard Brouer, yhs

While playing with using libbpf for the Suricata project, we had
issues LLVM >= 4.0.1 generating ELF files that could not be loaded
with libbpf (tools/lib/bpf/).

During the troubleshooting phase, I wrote a test program and improved
the debugging output in libbpf.  I turned this into a selftests
program, and it also serves as a code example for libbpf in itself.

I discovered that there are at least three ELF load issues with
libbpf.  I left them as TODO comments in (tools/testing/selftests/bpf)
test_libbpf.sh. I've only fixed the load issue with eh_frames.  We can
work on the other issues later.

---

Jesper Dangaard Brouer (5):
      bpf: Sync kernel ABI header with tooling header for bpf_common.h
      tools/libbpf: improve the pr_debug statements to contain section numbers
      selftests/bpf: add test program for loading BPF ELF files
      selftests/bpf: add selftest that use test_libbpf_open
      tools/libbpf: handle issues with bpf ELF objects containing .eh_frames


 tools/include/uapi/linux/bpf_common.h          |    7 +
 tools/lib/bpf/libbpf.c                         |   32 +++--
 tools/testing/selftests/bpf/Makefile           |   12 ++
 tools/testing/selftests/bpf/test_libbpf.sh     |   49 ++++++++
 tools/testing/selftests/bpf/test_libbpf_open.c |  150 ++++++++++++++++++++++++
 5 files changed, 234 insertions(+), 16 deletions(-)
 create mode 100755 tools/testing/selftests/bpf/test_libbpf.sh
 create mode 100644 tools/testing/selftests/bpf/test_libbpf_open.c

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

end of thread, other threads:[~2018-02-08  8:42 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-06 14:54 [bpf-next V2 PATCH 0/5] tools/libbpf improvements and selftests Jesper Dangaard Brouer
2018-02-06 14:54 ` [bpf-next V2 PATCH 1/5] bpf: Sync kernel ABI header with tooling header for bpf_common.h Jesper Dangaard Brouer
2018-02-06 14:54 ` [bpf-next V2 PATCH 2/5] tools/libbpf: improve the pr_debug statements to contain section numbers Jesper Dangaard Brouer
2018-02-06 14:54 ` [bpf-next V2 PATCH 3/5] selftests/bpf: add test program for loading BPF ELF files Jesper Dangaard Brouer
2018-02-06 14:54 ` [bpf-next V2 PATCH 4/5] selftests/bpf: add selftest that use test_libbpf_open Jesper Dangaard Brouer
2018-02-06 14:54 ` [bpf-next V2 PATCH 5/5] tools/libbpf: handle issues with bpf ELF objects containing .eh_frames Jesper Dangaard Brouer
2018-02-06 16:00   ` Alexei Starovoitov
2018-02-06 17:03     ` Jesper Dangaard Brouer
2018-02-06 19:05       ` Daniel Borkmann
2018-02-07 12:40         ` Jesper Dangaard Brouer
2018-02-07 13:19           ` Daniel Borkmann
2018-02-07 14:58             ` Jesper Dangaard Brouer
2018-02-07 16:18               ` Daniel Borkmann
2018-02-07 22:21               ` [suricata PATCH 0/3] Suricata cleanup makefile Jesper Dangaard Brouer
2018-02-07 22:21                 ` [suricata PATCH 1/3] suricata/ebpf: take clang -target bpf include issue of stdint.h into account Jesper Dangaard Brouer
2018-02-07 23:52                   ` Eric Leblond
2018-02-08  8:42                     ` Jesper Dangaard Brouer
2018-02-07 22:21                 ` [suricata PATCH 2/3] suricata/ebpf: compile with clang -target bpf Jesper Dangaard Brouer
2018-02-07 22:21                 ` [suricata PATCH 3/3] suricata/ebpf: improving the ebpf makefile Jesper Dangaard Brouer
2018-02-07 22:38                 ` [suricata PATCH 0/3] Suricata cleanup makefile Eric Leblond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).