From 10a47fb67340bca274276faf855d7d460afd9a7a Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Fri, 26 Jun 2026 15:17:28 +0100 Subject: tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures 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 Cc: Arnaldo Carvalho de Melo Cc: David Matlack Signed-off-by: Will Deacon --- tools/include/linux/types.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/include/linux') 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. -- cgit v1.2.3 From 7a1f400ff5e57f41e23c8145a54ea084039b023c Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 5 Aug 2026 22:32:23 +0100 Subject: tools: Ensure tools copy of linux/filter.h exports the UAPI Normally when there is an include/foo.h and an include/uapi/foo.h the non-UAPI copy includes the UAPI copy. This is the case for the in kernel copy of linux/filter.h but not for the copy in tools/ which results in build breaks for the newly added arm64 seccomp_ptrace_x0_bypass selftest. Add an explicit include of the uapi to fix the test and avoid future surprises. Fixes: 2fcbc4adf997 ("kselftest/arm64: Add seccomp ptrace x0 bypass test") Fixes: f143c11bb7b9 ("tools: bpf: Use local copy of headers including uapi/linux/filter.h") Signed-off-by: Mark Brown Signed-off-by: Will Deacon --- tools/include/linux/filter.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/include/linux') diff --git a/tools/include/linux/filter.h b/tools/include/linux/filter.h index bcc6df79301a..4ead4e72097c 100644 --- a/tools/include/linux/filter.h +++ b/tools/include/linux/filter.h @@ -6,6 +6,7 @@ #define __TOOLS_LINUX_FILTER_H #include +#include /* ArgX, context and stack frame pointer register positions. Note, * Arg1, Arg2, Arg3, etc are used as argument mappings of function -- cgit v1.2.3