From fdb7dacc73b71cc788e13d63e5111033c0bec27b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 27 Aug 2026 11:55:16 +0200 Subject: [PATCH] package/libbpf: update UAPI header installation work-around MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bpftrace often needs very recent kernel headers, more recent than the runtime version actually needed. We already had a workaround in libbpf making sure that if the kernel headers are older than 6.1, we would install the libbpf provided headers instead. As we are about to update bpftrace to a newer version that uses BPF_TRACE_KPROBE_SESSION, which was introduced in Linux 6.10, we need to update this workaround accordingly and ensure that the libbpf header is installed if the kernel headers are older than 6.10. This is necessary for the update of bpftrace to 0.26.1. Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit e9c540ddd27e21e0156a3ea67e75117c44271dcb) Signed-off-by: Raphaël Mélotte --- package/libbpf/libbpf.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/package/libbpf/libbpf.mk b/package/libbpf/libbpf.mk index 5a6d574331..0683ec12c1 100644 --- a/package/libbpf/libbpf.mk +++ b/package/libbpf/libbpf.mk @@ -18,14 +18,12 @@ define LIBBPF_BUILD_CMDS -C $(@D)/src endef -# bpftrace uses bpf_iter_link_info.task that was added since kernel 6.1 +# bpftrace uses BPF_TRACE_KPROBE_SESSION that was added since kernel 6.10 # so we need to update some uapi headers in STAGING_DIR if the toolchain -# is build with linux-headers < 6.1. +# is build with linux-headers < 6.1.0 # Otherwise bpftrace is broken due to out of date linux/bpf.h installed # by the toolchain. -# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f0d74c4da1f060d2a66976193712a5e6abd361f5 -# https://github.com/bpftrace/bpftrace/commit/7578314df67df6bbdffaf493ff3b4d182b235b34 -ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1),) +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_10),) LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf define LIBBPF_FIX_STAGING_PC