tools/include/uapi/linux/types.h | 3 +++ 1 file changed, 3 insertions(+)
From: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
included from assembly code.
Mirror this behaviour in the tools/ variant.
Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
toolchain automatically.
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/
Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
---
This is a fix for a build break in the vDSO selftests which was
introduced some time ago in the tip tree, Thomas posted the fix on 21st
March the day after I reported it but it's not been picked up and the
issue is now in mainline. I'm sending it directly to try to avoid -rc1
being broken.
---
tools/include/uapi/linux/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/include/uapi/linux/types.h b/tools/include/uapi/linux/types.h
index 91fa51a9c31d..85aa327245c6 100644
--- a/tools/include/uapi/linux/types.h
+++ b/tools/include/uapi/linux/types.h
@@ -4,6 +4,8 @@
#include <asm-generic/int-ll64.h>
+#ifndef __ASSEMBLER__
+
/* copied from linux:include/uapi/linux/types.h */
#define __bitwise
typedef __u16 __bitwise __le16;
@@ -20,4 +22,5 @@ typedef __u32 __bitwise __wsum;
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
+#endif /* __ASSEMBLER__ */
#endif /* _UAPI_LINUX_TYPES_H */
---
base-commit: acc4d5ff0b61eb1715c498b6536c38c1feb7f3c1
change-id: 20250402-kselftest-vdso-fix-d97fb8b09020
Best regards,
--
Mark Brown <broonie@kernel.org>
On Wed, Apr 02, 2025 at 09:21:57PM +0100, Mark Brown wrote:
> From: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>
> The "real" linux/types.h UAPI header gracefully degrades to a NOOP when
> included from assembly code.
>
> Mirror this behaviour in the tools/ variant.
>
> Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the
> toolchain automatically.
The issue the vDSO tests not building on at least arm64 that is fixed by
this patch is still present in mainline, it would be great if we could
get it fixed for -rc1.
> Reported-by: Mark Brown <broonie@kernel.org>
> Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/
> Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Link: https://patch.msgid.link/20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> This is a fix for a build break in the vDSO selftests which was
> introduced some time ago in the tip tree, Thomas posted the fix on 21st
> March the day after I reported it but it's not been picked up and the
> issue is now in mainline. I'm sending it directly to try to avoid -rc1
> being broken.
> ---
> tools/include/uapi/linux/types.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/include/uapi/linux/types.h b/tools/include/uapi/linux/types.h
> index 91fa51a9c31d..85aa327245c6 100644
> --- a/tools/include/uapi/linux/types.h
> +++ b/tools/include/uapi/linux/types.h
> @@ -4,6 +4,8 @@
>
> #include <asm-generic/int-ll64.h>
>
> +#ifndef __ASSEMBLER__
> +
> /* copied from linux:include/uapi/linux/types.h */
> #define __bitwise
> typedef __u16 __bitwise __le16;
> @@ -20,4 +22,5 @@ typedef __u32 __bitwise __wsum;
> #define __aligned_be64 __be64 __attribute__((aligned(8)))
> #define __aligned_le64 __le64 __attribute__((aligned(8)))
>
> +#endif /* __ASSEMBLER__ */
> #endif /* _UAPI_LINUX_TYPES_H */
>
> ---
> base-commit: acc4d5ff0b61eb1715c498b6536c38c1feb7f3c1
> change-id: 20250402-kselftest-vdso-fix-d97fb8b09020
>
> Best regards,
> --
> Mark Brown <broonie@kernel.org>
>
© 2016 - 2026 Red Hat, Inc.