Andrii Nakryiko
45ad862601
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: 2c6a577d719e96c89b1aaa631089cce69b4d0045
Checkpoint commit: 8fc9f8bedf1bdaea48382ae2e3dd558e2b939cee
Andrii Nakryiko (19):
libbpf: add common min/max macro to libbpf_internal.h
libbpf: extract BTF loading logic
libbpf: streamline ELF parsing error-handling
libbpf: refactor map initialization
libbpf: identify maps by section index in addition to offset
libbpf: split initialization and loading of BTF
libbpf: allow specifying map definitions using BTF
libbpf: constify getter APIs
libbpf: fix GCC8 warning for strncpy
libbpf: make libbpf_strerror_r agnostic to sign of error
libbpf: introduce concept of bpf_link
libbpf: add ability to attach/detach BPF program to perf event
libbpf: add kprobe/uprobe attach API
libbpf: add tracepoint attach API
libbpf: add raw tracepoint attach API
libbpf: capture value in BTF type info for BTF-defined map defs
libbpf: add perf buffer API
libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs
libbpf: add perf_buffer_ prefix to README
Colin Ian King (1):
libbpf: fix spelling mistake "conflictling" -> "conflicting"
Daniel Borkmann (2):
bpf: sync tooling uapi header
bpf, libbpf: enable recvmsg attach types
Ivan Khoronzhuk (1):
libbpf: fix max() type mismatch for 32bit
Leo Yan (1):
bpf, libbpf, smatch: Fix potential NULL pointer dereference
Martynas Pumputis (1):
bpf: sync BPF_FIB_LOOKUP flag changes with BPF uapi
Maxim Mikityanskiy (3):
xsk: Add getsockopt XDP_OPTIONS
libbpf: Support getsockopt XDP_OPTIONS
xsk: Change the default frame size to 4096 and allow controlling it
Michal Rostecki (1):
libbpf: Return btf_fd for load_sk_storage_btf
Stanislav Fomichev (4):
bpf: sync bpf.h to tools/
libbpf: support sockopt hooks
bpf/tools: sync bpf.h
bpf: sync bpf.h to tools/
Vincent Bernat (1):
bonding: add an option to specify a delay between peer notifications
include/uapi/linux/bpf.h | 38 +-
include/uapi/linux/if_link.h | 1 +
include/uapi/linux/if_xdp.h | 8 +
src/README.rst | 3 +-
src/bpf.c | 7 +-
src/bpf_prog_linfo.c | 5 +-
src/btf.c | 3 -
src/btf.h | 1 +
src/btf_dump.c | 3 -
src/libbpf.c | 1670 ++++++++++++++++++++++++++++------
src/libbpf.h | 132 ++-
src/libbpf.map | 12 +-
src/libbpf_internal.h | 11 +-
src/libbpf_probes.c | 14 +-
src/str_error.c | 2 +-
src/xsk.c | 15 +-
src/xsk.h | 2 +-
17 files changed, 1601 insertions(+), 326 deletions(-)
--
2.17.1
2019-07-08 12:52:46 -07:00
Andrii Nakryiko
52ec16bce8
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: 5e2ac390fbd08b2a462db66cef2663e4db0d5191
Checkpoint commit: 2c6a577d719e96c89b1aaa631089cce69b4d0045
Andrii Nakryiko (1):
libbpf: fix check for presence of associated BTF for map creation
Stanislav Fomichev (1):
bpf/tools: sync bpf.h
include/uapi/linux/bpf.h | 2 ++
src/libbpf.c | 9 +++++----
2 files changed, 7 insertions(+), 4 deletions(-)
--
2.17.1
2019-06-14 16:53:36 -07:00
Andrii Nakryiko
39de671179
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: e672db03ab0e43e41ab6f8b2156a10d6e40f243d
Checkpoint commit: 5e2ac390fbd08b2a462db66cef2663e4db0d5191
Andrii Nakryiko (9):
libbpf: fix detection of corrupted BPF instructions section
libbpf: preserve errno before calling into user callback
libbpf: simplify endianness check
libbpf: check map name retrieved from ELF
libbpf: fix error code returned on corrupted ELF
libbpf: use negative fd to specify missing BTF
libbpf: simplify two pieces of logic
libbpf: typo and formatting fixes
libbpf: reduce unnecessary line wrapping
Hechao Li (1):
bpf: add a new API libbpf_num_possible_cpus()
Jonathan Lemon (2):
bpf/tools: sync bpf.h
libbpf: remove qidconf and better support external bpf programs.
Quentin Monnet (1):
libbpf: prevent overwriting of log_level in bpf_object__load_progs()
include/uapi/linux/bpf.h | 4 +
src/libbpf.c | 207 ++++++++++++++++++++++-----------------
src/libbpf.h | 16 +++
src/libbpf.map | 1 +
src/xsk.c | 103 ++++++-------------
5 files changed, 167 insertions(+), 164 deletions(-)
--
2.17.1
2019-06-11 10:18:48 -07:00
Andrii Nakryiko
75db50f4a0
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: f49aa1de98363b6c5fba4637678d6b0ba3d18065
Checkpoint commit: e672db03ab0e43e41ab6f8b2156a10d6e40f243d
Andrii Nakryiko (5):
libbpf: ensure libbpf.h is included along libbpf_internal.h
libbpf: add btf__parse_elf API to load .BTF and .BTF.ext
libbpf: add resizable non-thread safe internal hashmap
libbpf: switch btf_dedup() to hashmap for dedup table
libbpf: add btf_dump API for BTF-to-C conversion
Hariprasad Kelam (1):
libbpf: fix warning that PTR_ERR_OR_ZERO can be used
Jiong Wang (2):
tools: bpf: sync uapi header bpf.h
libbpf: add "prog_flags" to
bpf_program/bpf_prog_load_attr/bpf_load_program_attr
Quentin Monnet (1):
libbpf: add bpf_object__load_xattr() API function to pass log_level
Yonghong Song (1):
tools/bpf: sync bpf uapi header bpf.h to tools directory
include/uapi/linux/bpf.h | 35 +-
src/bpf.c | 1 +
src/bpf.h | 1 +
src/btf.c | 329 ++++++----
src/btf.h | 19 +
src/btf_dump.c | 1336 ++++++++++++++++++++++++++++++++++++++
src/hashmap.c | 229 +++++++
src/hashmap.h | 173 +++++
src/libbpf.c | 27 +-
src/libbpf.h | 7 +
src/libbpf.map | 9 +
src/libbpf_internal.h | 2 +
12 files changed, 2045 insertions(+), 123 deletions(-)
create mode 100644 src/btf_dump.c
create mode 100644 src/hashmap.c
create mode 100644 src/hashmap.h
--
2.17.1
2019-05-29 10:27:27 -07:00
Andrii Nakryiko
59a641543e
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: 35c99ffa20edd3c24be352d28a63cd3a23121282
Checkpoint commit: f49aa1de98363b6c5fba4637678d6b0ba3d18065
Andrii Nakryiko (1):
libbpf: move logging helpers into libbpf_internal.h
Gary Lin (1):
tools/bpf: Sync kernel btf.h header
Stanislav Fomichev (1):
libbpf: don't fail when feature probing fails
include/uapi/linux/btf.h | 2 +-
src/btf.c | 2 +-
src/libbpf.c | 3 +--
src/libbpf_internal.h | 13 +++++++++++++
src/libbpf_util.h | 13 -------------
src/xsk.c | 2 +-
6 files changed, 17 insertions(+), 18 deletions(-)
--
2.17.1
2019-05-23 15:09:13 -07:00
Andrii Nakryiko
5188b0ca5c
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: ba02de1aa04e392e15ef503c6dd5166915d9d4de
Checkpoint commit: 35c99ffa20edd3c24be352d28a63cd3a23121282
Andrii Nakryiko (1):
libbpf: detect supported kernel BTF features and sanitize BTF
Björn Töpel (3):
libbpf: fix invalid munmap call
libbpf: proper XSKMAP cleanup
libbpf: remove unnecessary cast-to-void
Daniel Borkmann (2):
bpf, libbpf: handle old kernels more graceful wrt global data sections
bpf, libbpf: fix segfault in bpf_object__init_maps' pr_debug statement
Daniel T. Lee (1):
libbpf: fix samples/bpf build failure due to undefined UINT32_MAX
Magnus Karlsson (1):
libbpf: remove compile time warning from libbpf_util.h
Martin KaFai Lau (2):
bpf: Sync bpf.h to tools
bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing
Matt Mullins (1):
tools: sync bpf.h
McCabe, Robert J (1):
libbpf: fix BPF_LOG_BUF_SIZE off-by-one error
Quentin Monnet (1):
tools: bpf: synchronise BPF UAPI header with tools
Vineet Gupta (1):
tools/bpf: fix perf build error with uClibc (seen on ARC)
include/uapi/linux/bpf.h | 177 +++++++++++++++++++----------
src/bpf.c | 2 +
src/bpf.h | 3 +-
src/libbpf.c | 236 ++++++++++++++++++++++++++++++++++++---
src/libbpf_internal.h | 27 +++++
src/libbpf_probes.c | 84 +++++++++++++-
src/libbpf_util.h | 2 +-
src/xsk.c | 184 +++++++++++++++---------------
8 files changed, 544 insertions(+), 171 deletions(-)
create mode 100644 src/libbpf_internal.h
--
2.17.1
2019-05-16 09:40:04 -07:00
Andrii Nakryiko
910c475f09
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: 3daf8e703ec3dcf73a27a7dcabbac152793eb114
Checkpoint commit: ba02de1aa04e392e15ef503c6dd5166915d9d4de
Alan Maguire (2):
bpf: sync bpf.h to tools/ for BPF_F_ADJ_ROOM_ENCAP_L2
bpf: fix whitespace for ENCAP_L2 defines in bpf.h
Andrey Ignatov (3):
bpf: Sync bpf.h to tools/
libbpf: Support sysctl hook
bpf: Sync bpf.h to tools/
Andrii Nakryiko (2):
btf: add support for VAR and DATASEC in btf_dedup()
libbpf: fix printf formatter for ptrdiff_t argument
Magnus Karlsson (4):
libbpf: fix XDP socket ring buffer memory ordering
libbpf: remove likely/unlikely in xsk.h
libbpf: remove dependency on barrier.h in xsk.h
libbpf: optimize barrier for XDP socket rings
include/uapi/linux/bpf.h | 149 ++++++++++++++++++++++++++++++++++++++-
src/btf.c | 29 +++++++-
src/libbpf.c | 5 +-
src/libbpf_probes.c | 1 +
src/libbpf_util.h | 30 ++++++++
src/xsk.h | 22 ++++--
6 files changed, 226 insertions(+), 10 deletions(-)
--
2.17.1
2019-04-19 09:52:37 -07:00
Yonghong Song
5844f6e4dd
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: 50bd645b3a21a374dbd0fa8273a5f4e98001fb05
Checkpoint commit: 3daf8e703ec3dcf73a27a7dcabbac152793eb114
Andrey Ignatov (1):
libbpf: Fix build with gcc-8
Stanislav Fomichev (1):
libbpf: add support for ctx_{size, }_{in, out} in BPF_PROG_TEST_RUN
include/uapi/linux/bpf.h | 7 +++++++
src/bpf.c | 5 +++++
src/bpf.h | 5 +++++
src/libbpf.c | 2 +-
4 files changed, 18 insertions(+), 1 deletion(-)
--
2.17.1
2019-04-11 09:01:12 -07:00
Yonghong Song
f49907472f
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: dd399ac9e343c7573c47d6820e4a23013c54749d
Checkpoint commit: 50bd645b3a21a374dbd0fa8273a5f4e98001fb05
Alexei Starovoitov (1):
libbpf: teach libbpf about log_level bit 2
Andrey Ignatov (1):
libbpf: Ignore -Wformat-nonliteral warning
Daniel Borkmann (3):
bpf: sync {btf, bpf}.h uapi header from tools infrastructure
bpf, libbpf: support global data/bss/rodata sections
bpf, libbpf: add support for BTF Var and DataSec
Joe Stringer (1):
bpf, libbpf: refactor relocation handling
Magnus Karlsson (1):
libbpf: fix crash in XDP socket part with new larger BPF_LOG_BUF_SIZE
Yonghong Song (1):
bpf, bpftool: fix a few ubsan warnings
include/uapi/linux/bpf.h | 20 +-
include/uapi/linux/btf.h | 32 ++-
src/bpf.c | 31 ++-
src/bpf.h | 3 +-
src/btf.c | 97 ++++++-
src/btf.h | 3 +
src/libbpf.c | 567 ++++++++++++++++++++++++++++++++-------
src/libbpf.h | 6 +
src/libbpf.map | 7 +
src/xsk.c | 9 +-
10 files changed, 658 insertions(+), 117 deletions(-)
--
2.17.1
2019-04-10 14:27:33 -07:00
Andrii Nakryiko
27a5f60a8b
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: f01a7dbe98ae4265023fa5d3af0f076f0b18a647
Checkpoint commit: dd399ac9e343c7573c47d6820e4a23013c54749d
Arnaldo Carvalho de Melo (1):
tools lib bpf: Fix the build by adding a missing stdarg.h include
Changbin Du (1):
perf tools: Fix errors under optimization level '-Og'
Daniel Borkmann (1):
bpf, libbpf: clarify bump in libbpf version info
Lorenz Bauer (1):
tools: update include/uapi/linux/bpf.h
Luca Boccassi (1):
tools/bpf: generate pkg-config file for libbpf
Song Liu (1):
tools lib bpf: Introduce bpf_program__get_prog_info_linear()
Willem de Bruijn (1):
bpf: Sync bpf.h to tools
include/uapi/linux/bpf.h | 65 +++++++++-
src/README.rst | 1 +
src/libbpf.c | 253 ++++++++++++++++++++++++++++++++++++++-
src/libbpf.h | 64 ++++++++++
src/libbpf.map | 3 +
src/libbpf.pc.template | 12 ++
6 files changed, 393 insertions(+), 5 deletions(-)
create mode 100644 src/libbpf.pc.template
--
2.17.1
2019-03-28 19:51:55 -07:00
Andrii Nakryiko
5877849633
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: f01a7dbe98ae4265023fa5d3af0f076f0b18a647
Checkpoint commit: 8543e437807970166c2b66b79935c9f4b0e6d1f9
Andrii Nakryiko (1):
libbpf: fix btf_dedup equivalence check handling of different kinds
Daniel Borkmann (1):
bpf, libbpf: clarify bump in libbpf version info
src/README.rst | 1 +
src/btf.c | 3 +++
2 files changed, 4 insertions(+)
--
2.17.1
2019-03-28 19:51:55 -07:00
Andrii Nakryiko
33b0174985
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: ea5bade929bf04355aeed58a3c9f5ef2c3afe2ac
Checkpoint commit: f01a7dbe98ae4265023fa5d3af0f076f0b18a647
Andrii Nakryiko (2):
libbpf: handle BTF parsing and loading properly
btf: resolve enum fwds in btf_dedup
Magnus Karlsson (1):
libbpf: fix to reject unknown flags in xsk_socket__create()
Martin KaFai Lau (1):
bpf: Sync bpf.h to tools/
Nikita V. Shirokov (1):
bpf, libbpf: fixing leak when kernel does not support btf
Quentin Monnet (1):
tools: bpf: synchronise BPF UAPI header with tools
include/uapi/linux/bpf.h | 188 ++++++++++++++++++++++++++-------------
src/btf.c | 51 ++++++++---
src/libbpf.c | 11 ++-
src/xsk.c | 15 +++-
4 files changed, 186 insertions(+), 79 deletions(-)
--
2.17.1
2019-03-19 12:17:19 -07:00
Andrii Nakryiko
7a431904c8
sync: latest libbpf changes from kernel
...
Syncing latest libbpf commits from kernel repository.
Baseline commit: 5aab392c55c96f9bb26d9294f965f156a87ee81c
Checkpoint commit: ea5bade929bf04355aeed58a3c9f5ef2c3afe2ac
Alexei Starovoitov (1):
tools/bpf: sync bpf.h into tools
Andrii Nakryiko (3):
libbpf: fix formatting for btf_ext__get_raw_data
btf: allow to customize dedup hash table size
btf: fix bug with resolving STRUCT/UNION into corresponding FWD
Dan Carpenter (1):
tools/libbpf: signedness bug in btf_dedup_ref_type()
Jakub Kicinski (1):
tools: libbpf: add a correctly named define for map iteration
Magnus Karlsson (1):
libbpf: add support for using AF_XDP sockets
brakmo (1):
bpf: sync bpf.h to tools and update bpf_helpers.h
include/uapi/linux/bpf.h | 12 +-
src/README.rst | 15 +-
src/btf.c | 76 ++--
src/btf.h | 3 +-
src/libbpf.c | 8 +-
src/libbpf.h | 3 +-
src/libbpf.map | 6 +
src/xsk.c | 723 +++++++++++++++++++++++++++++++++++++++
src/xsk.h | 203 +++++++++++
9 files changed, 1020 insertions(+), 29 deletions(-)
create mode 100644 src/xsk.c
create mode 100644 src/xsk.h
--
2.17.1
2019-03-02 21:31:13 -08:00
Andrii Nakryiko
d5fa4150f0
libbpf sync 2019-02-17T06:35:29.358Z ( #14 )
...
* tools/libbpf: support bigger BTF data sizes
While it's understandable why kernel limits number of BTF types to 65535
and size of string section to 64KB, in libbpf as user-space library it's
too restrictive. E.g., pahole converting DWARF to BTF type information
for Linux kernel generates more than 3 million BTF types and more than
3MB of strings, before deduplication. So to allow btf__dedup() to do its
work, we need to be able to load bigger BTF sections using btf__new().
Singed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
* sync: latest libbpf changes from kernel
Syncing latest libbpf commits from kernel repository.
Baseline commit: 789f6bab849e04ea029c09b81dc8401dc0268cf9
Checkpoint commit: 5aab392c55c96f9bb26d9294f965f156a87ee81c
Andrii Nakryiko (1):
tools/libbpf: support bigger BTF data sizes
src/btf.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
--
2.17.1
2019-02-16 22:41:31 -08:00
Andrii Nakryiko
8e42f42533
scripts: add script to sync kernel changes ( #13 )
...
This script automates the process of applying libbpf-relevant changes
from kernel repository on top of current state of libbpf repository.
It uses CHECKPOINT-COMMIT file to keep track of last commit in kernel
repo up to which libbpf is in sync with. If there are any new libbpf
changes in kernel repository, script extracts them, preserving original
commit metadata. It also creates a "sync commit" using cover letter as
a template, which nicely summarizes changes since last sync with kernel.
Usage: ./scripts/sync-kernel.sh <linux-repo> <libbpf-repo>
If it succeeds, script will create a bunch of local commits in
<libbpf-repo> in separate branch, which can be easily pushed into github
to create a pull request.
Script tries to clean up after itself, except in case of failure. But it
doesn't clean up timestamped branches it creates in both kernel and
libbpf repositories for now. We can add that later.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
2019-02-16 22:22:30 -08:00