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" ( 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