Re: [PATCH v2 1/2] tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures
From: Jeremy Linton
Date: Thu Sep 03 2026 - 20:23:08 EST
Hi,
Please consider this for all supported stable/LTS kernels.
Without this commit, older kernel trees will fail to build tools on systems running newer kernel headers.
Upstream commit:
10a47fb67340 ("tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures")
Thanks,
Cc: stable@xxxxxxxxxxxxxxx
On 6/26/26 9:17 AM, Will Deacon wrote:
The arm64 UAPI exposes some 128-bit integer types to represent things
such as fpsimd registers in the sigcontext. In preparation for defining
these using the '__u128' typedef implemented by uapi/linux/types.h, copy
that typedef over to the private linux/types.h header used by the tools
directory.
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: David Matlack <dmatlack@xxxxxxxxxx>
Signed-off-by: Will Deacon <will@xxxxxxxxxx>
---
tools/include/linux/types.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h
index d41f8a261bce..b6c473b7920d 100644
--- a/tools/include/linux/types.h
+++ b/tools/include/linux/types.h
@@ -23,6 +23,11 @@ typedef enum {
__GFP_HIGH
} gfp_t;
+#ifdef __SIZEOF_INT128__
+typedef __signed__ __int128 __s128 __attribute__((aligned(16)));
+typedef unsigned __int128 __u128 __attribute__((aligned(16)));
+#endif
+
/*
* We define u64 as uint64_t for every architecture
* so that we can print it with "%"PRIx64 without getting warnings.