From 1367a6e9102d0d62100433c7868297b2817646bc Mon Sep 17 00:00:00 2001 From: Garden Linux Builder Date: Tue, 17 Nov 2026 10:50:47 +0000 Subject: [PATCH 1/2] Update kernel 6.18.63 -> 6.18.64 Signed-off-by: Saubhik Datta <50126327+saubhikdattagithub@users.noreply.github.com> --- prepare_source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prepare_source b/prepare_source index 5ba1e13..d308777 100755 --- a/prepare_source +++ b/prepare_source @@ -1,6 +1,6 @@ pkg=linux -version_orig=6.18.63 +version_orig=6.18.64 version="$version_orig-1" ( From f1129455a6c395dddb0500d38ca4d5e7d285bd3c Mon Sep 17 00:00:00 2001 From: Saubhik Datta <50126327+saubhikdattagithub@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:31:50 +0100 Subject: [PATCH 2/2] fix: define __u128 for arm64 resolve_btfids build with Trixie 7.x headers Trixie's linux-libc-dev (kernel 7.x) switched the arm64 UAPI headers (asm/sigcontext.h, asm/ptrace.h) from __uint128_t to __u128. During the in-kernel resolve_btfids/libbpf build on native arm64, those system headers are pulled in but resolves to the in-tree 6.18 tools shims (via -I tools/include, ahead of /usr/include), which lack the __u128 typedef, failing with 'unknown type name __u128'. Add __s128/__u128 typedefs (guarded by __SIZEOF_INT128__) to both tools/include/linux/types.h and tools/include/uapi/linux/types.h, covering both include chains. Verified green on amd64 and arm64 binary builds. Signed-off-by: Saubhik Datta <50126327+saubhikdattagithub@users.noreply.github.com> --- ...ls-uapi-define-u128-for-arm64-compat.patch | 63 +++++++++++++++++++ upstream_patches/series | 1 + 2 files changed, 64 insertions(+) create mode 100644 upstream_patches/0007-tools-uapi-define-u128-for-arm64-compat.patch diff --git a/upstream_patches/0007-tools-uapi-define-u128-for-arm64-compat.patch b/upstream_patches/0007-tools-uapi-define-u128-for-arm64-compat.patch new file mode 100644 index 0000000..4e75e08 --- /dev/null +++ b/upstream_patches/0007-tools-uapi-define-u128-for-arm64-compat.patch @@ -0,0 +1,63 @@ +From: Garden Linux Maintainers +Date: Wed, 19 Nov 2026 14:00:00 +0000 +Subject: tools headers: define __u128/__s128 for arm64 __u128 compat + +Debian stable (Trixie) ships linux-libc-dev from kernel 7.x which changed +the arm64 UAPI headers (asm/sigcontext.h, asm/ptrace.h) to use __u128 +instead of __uint128_t, and added the matching __u128/__s128 typedefs to +/usr/include/linux/types.h. + +When tools/bpf/resolve_btfids builds libbpf as part of the in-kernel BTF +generation on a native arm64 host, the preprocessor pulls in the system +header /usr/lib/linux/uapi/arm64/asm/sigcontext.h (7.x, uses __u128). That +header does #include , but the build runs with +-I tools/include ahead of /usr/include, so resolves to the +in-tree tools/include/linux/types.h (6.18), which lacks the __u128 typedef. +The build then fails with: + + /usr/lib/linux/uapi/arm64/asm/sigcontext.h:81:9: error: unknown type name '__u128' + /usr/lib/linux/uapi/arm64/asm/ptrace.h:96:9: error: unknown type name '__u128' + +Define the __s128/__u128 typedefs in both tools linux/types.h shims (the +non-uapi one is resolved by the glibc signal.h -> asm/sigcontext.h chain; +the uapi one by the libbpf.c -> bpf_perf_event.h -> asm/ptrace.h chain) so +the typedef the 7.x system headers reference is available via either +include root. Guarded by __SIZEOF_INT128__ so it only applies on targets +with 128-bit integer support. + +Signed-off-by: Garden Linux Maintainers +--- + tools/include/linux/types.h | 5 +++++ + tools/include/uapi/linux/types.h | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h +--- a/tools/include/linux/types.h ++++ b/tools/include/linux/types.h +@@ -40,6 +40,11 @@ typedef __s16 s16; + typedef __u8 u8; + typedef __s8 s8; + ++#ifdef __SIZEOF_INT128__ ++typedef __signed__ __int128 __s128 __attribute__((aligned(16))); ++typedef unsigned __int128 __u128 __attribute__((aligned(16))); ++#endif ++ + typedef unsigned long long ullong; + + #ifdef __CHECKER__ +diff --git a/tools/include/uapi/linux/types.h b/tools/include/uapi/linux/types.h +--- a/tools/include/uapi/linux/types.h ++++ b/tools/include/uapi/linux/types.h +@@ -16,6 +16,11 @@ typedef __u64 __bitwise __be64; + typedef __u16 __bitwise __sum16; + typedef __u32 __bitwise __wsum; + ++#ifdef __SIZEOF_INT128__ ++typedef __signed__ __int128 __s128 __attribute__((aligned(16))); ++typedef unsigned __int128 __u128 __attribute__((aligned(16))); ++#endif ++ + #define __aligned_u64 __u64 __attribute__((aligned(8))) + #define __aligned_be64 __be64 __attribute__((aligned(8))) + #define __aligned_le64 __le64 __attribute__((aligned(8))) diff --git a/upstream_patches/series b/upstream_patches/series index f1bc49f..5aa8bf0 100644 --- a/upstream_patches/series +++ b/upstream_patches/series @@ -4,3 +4,4 @@ 0004-flag-instantiations-as-FIPS_compliant.patch 0005-disable-xxhash64.patch 0006-gve-fix-SW-coalescing-when-hw-GRO-is-used.patch +0007-tools-uapi-define-u128-for-arm64-compat.patch