Tags: guesslin/libbpf
Tags
libbpf: Fix build with latest gcc/binutils with LTO After updating to binutils 2.35, the build began to fail with an assembler error. A bug was opened on the Red Hat Bugzilla a few days later for the same issue. Work around the problem by using the new `symver` attribute (introduced in GCC 10) as needed instead of assembler directives. This addresses Red Hat ([0]) and OpenSUSE ([1]) bug reports, as well as libbpf issue ([2]). [0]: https://bugzilla.redhat.com/show_bug.cgi?id=1863059 [1]: https://bugzilla.opensuse.org/show_bug.cgi?id=1188749 [2]: Closes: libbpf#338 Co-developed-by: Patrick McCarty <patrick.mccarty@intel.com> Co-developed-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com> Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210907221023.2660953-1-andrii@kernel.org
sync: latest libbpf changes from kernel Syncing latest libbpf commits from kernel repository. Baseline commit: 8fc9f8bedf1bdaea48382ae2e3dd558e2b939cee Checkpoint commit: 66b5f1c439843bcbab01cc7f3854ae2742f3d1e3 Andrii Nakryiko (2): libbpf: fix ptr to u64 conversion warning on 32-bit platforms libbpf: fix another GCC8 warning for strncpy Baruch Siach (1): bpf: fix uapi bpf_prog_info fields alignment Mauro Carvalho Chehab (2): docs: cgroup-v1: convert docs to ReST and rename to *.rst docs: cgroup-v1: add it to the admin-guide book Stanislav Fomichev (1): bpf: sync bpf.h to tools/ include/uapi/linux/bpf.h | 7 ++++--- src/libbpf.c | 4 ++-- src/xsk.c | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) -- 2.17.1
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
libbpf: proper XSKMAP cleanup The bpf_map_update_elem() function, when used on an XSKMAP, will fail if not a valid AF_XDP socket is passed as value. Therefore, this is function cannot be used to clear the XSKMAP. Instead, the bpf_map_delete_elem() function should be used for that. This patch also simplifies the code by breaking up xsk_update_bpf_maps() into three smaller functions. Reported-by: William Tu <u9012063@gmail.com> Fixes: 1cad07884239 ("libbpf: add support for using AF_XDP sockets") Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Tested-by: William Tu <u9012063@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>