commit libbpf for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libbpf for openSUSE:Factory checked in at 2024-09-12 16:53:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libbpf (Old) and /work/SRC/openSUSE:Factory/.libbpf.new.17570 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libbpf" Thu Sep 12 16:53:54 2024 rev:24 rq:1199948 version:1.4.6 Changes: -------- --- /work/SRC/openSUSE:Factory/libbpf/libbpf.changes 2024-07-22 17:14:20.960514500 +0200 +++ /work/SRC/openSUSE:Factory/.libbpf.new.17570/libbpf.changes 2024-09-12 16:53:55.842795677 +0200 @@ -1,0 +2,7 @@ +Wed Sep 4 08:44:47 UTC 2024 - Fredrik Lönnegren <fredrik.lonnegren@suse.com> + +- update to 1.4.6: + * BPF skeleton forward compatibility fix (f6f2402); + * BTF endianness inheritance bug fix (fe28fae). + +------------------------------------------------------------------- Old: ---- libbpf-1.4.5.tar.gz New: ---- libbpf-1.4.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libbpf.spec ++++++ --- /var/tmp/diff_new_pack.v0LZe1/_old 2024-09-12 16:53:56.638828843 +0200 +++ /var/tmp/diff_new_pack.v0LZe1/_new 2024-09-12 16:53:56.642829010 +0200 @@ -19,7 +19,7 @@ %define sover_major 1 %define libname libbpf%{sover_major} Name: libbpf -Version: 1.4.5 +Version: 1.4.6 Release: 0 Summary: C library for managing eBPF programs and maps License: LGPL-2.1-only ++++++ libbpf-1.4.5.tar.gz -> libbpf-1.4.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbpf-1.4.5/src/Makefile new/libbpf-1.4.6/src/Makefile --- old/libbpf-1.4.5/src/Makefile 2024-07-11 20:44:22.000000000 +0200 +++ new/libbpf-1.4.6/src/Makefile 2024-09-03 22:53:35.000000000 +0200 @@ -10,7 +10,7 @@ LIBBPF_MAJOR_VERSION := 1 LIBBPF_MINOR_VERSION := 4 -LIBBPF_PATCH_VERSION := 5 +LIBBPF_PATCH_VERSION := 6 LIBBPF_VERSION := $(LIBBPF_MAJOR_VERSION).$(LIBBPF_MINOR_VERSION).$(LIBBPF_PATCH_VERSION) LIBBPF_MAJMIN_VERSION := $(LIBBPF_MAJOR_VERSION).$(LIBBPF_MINOR_VERSION).0 LIBBPF_MAP_VERSION := $(shell grep -oE '^LIBBPF_([0-9.]+)' libbpf.map | sort -rV | head -n1 | cut -d'_' -f2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbpf-1.4.5/src/btf.c new/libbpf-1.4.6/src/btf.c --- old/libbpf-1.4.5/src/btf.c 2024-07-11 20:44:22.000000000 +0200 +++ new/libbpf-1.4.6/src/btf.c 2024-09-03 22:53:35.000000000 +0200 @@ -991,6 +991,7 @@ btf->base_btf = base_btf; btf->start_id = btf__type_cnt(base_btf); btf->start_str_off = base_btf->hdr->str_len; + btf->swapped_endian = base_btf->swapped_endian; } /* +1 for empty string at offset 0 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbpf-1.4.5/src/libbpf.c new/libbpf-1.4.6/src/libbpf.c --- old/libbpf-1.4.5/src/libbpf.c 2024-07-11 20:44:22.000000000 +0200 +++ new/libbpf-1.4.6/src/libbpf.c 2024-09-03 22:53:35.000000000 +0200 @@ -7851,16 +7851,19 @@ } static struct bpf_object *bpf_object_open(const char *path, const void *obj_buf, size_t obj_buf_sz, + const char *obj_name, const struct bpf_object_open_opts *opts) { - const char *obj_name, *kconfig, *btf_tmp_path, *token_path; + const char *kconfig, *btf_tmp_path, *token_path; struct bpf_object *obj; - char tmp_name[64]; int err; char *log_buf; size_t log_size; __u32 log_level; + if (obj_buf && !obj_name) + return ERR_PTR(-EINVAL); + if (elf_version(EV_CURRENT) == EV_NONE) { pr_warn("failed to init libelf for %s\n", path ? : "(mem buf)"); @@ -7870,16 +7873,12 @@ if (!OPTS_VALID(opts, bpf_object_open_opts)) return ERR_PTR(-EINVAL); - obj_name = OPTS_GET(opts, object_name, NULL); + obj_name = OPTS_GET(opts, object_name, NULL) ?: obj_name; if (obj_buf) { - if (!obj_name) { - snprintf(tmp_name, sizeof(tmp_name), "%lx-%lx", - (unsigned long)obj_buf, - (unsigned long)obj_buf_sz); - obj_name = tmp_name; - } path = obj_name; pr_debug("loading object '%s' from buffer\n", obj_name); + } else { + pr_debug("loading object from %s\n", path); } log_buf = OPTS_GET(opts, kernel_log_buf, NULL); @@ -7963,9 +7962,7 @@ if (!path) return libbpf_err_ptr(-EINVAL); - pr_debug("loading %s\n", path); - - return libbpf_ptr(bpf_object_open(path, NULL, 0, opts)); + return libbpf_ptr(bpf_object_open(path, NULL, 0, NULL, opts)); } struct bpf_object *bpf_object__open(const char *path) @@ -7977,10 +7974,15 @@ bpf_object__open_mem(const void *obj_buf, size_t obj_buf_sz, const struct bpf_object_open_opts *opts) { + char tmp_name[64]; + if (!obj_buf || obj_buf_sz == 0) return libbpf_err_ptr(-EINVAL); - return libbpf_ptr(bpf_object_open(NULL, obj_buf, obj_buf_sz, opts)); + /* create a (quite useless) default "name" for this memory buffer object */ + snprintf(tmp_name, sizeof(tmp_name), "%lx-%zx", (unsigned long)obj_buf, obj_buf_sz); + + return libbpf_ptr(bpf_object_open(NULL, obj_buf, obj_buf_sz, tmp_name, opts)); } static int bpf_object_unload(struct bpf_object *obj) @@ -13635,29 +13637,13 @@ int bpf_object__open_skeleton(struct bpf_object_skeleton *s, const struct bpf_object_open_opts *opts) { - DECLARE_LIBBPF_OPTS(bpf_object_open_opts, skel_opts, - .object_name = s->name, - ); struct bpf_object *obj; int err; - /* Attempt to preserve opts->object_name, unless overriden by user - * explicitly. Overwriting object name for skeletons is discouraged, - * as it breaks global data maps, because they contain object name - * prefix as their own map name prefix. When skeleton is generated, - * bpftool is making an assumption that this name will stay the same. - */ - if (opts) { - memcpy(&skel_opts, opts, sizeof(*opts)); - if (!opts->object_name) - skel_opts.object_name = s->name; - } - - obj = bpf_object__open_mem(s->data, s->data_sz, &skel_opts); - err = libbpf_get_error(obj); - if (err) { - pr_warn("failed to initialize skeleton BPF object '%s': %d\n", - s->name, err); + obj = bpf_object_open(NULL, s->data, s->data_sz, s->name, opts); + if (IS_ERR(obj)) { + err = PTR_ERR(obj); + pr_warn("failed to initialize skeleton BPF object '%s': %d\n", s->name, err); return libbpf_err(err); }
participants (1)
-
Source-Sync