* [PATCH] kselftest/arm64: Fix build failure with GCC-15
@ 2026-04-22 17:01 Leo Yan
2026-04-22 17:20 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Leo Yan @ 2026-04-22 17:01 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Shuah Khan, Mark Brown,
Thiago Jung Bauermann
Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Leo Yan
Building on Debian sid with GCC 15 fails:
CC libc-gcs
libc-gcs.c: In function 'ptrace_read_write':
libc-gcs.c:142:25: error: storage size of 'child_gcs' isn't known
142 | struct user_gcs child_gcs;
| ^~~~~~~~~
libc-gcs.c:142:25: warning: unused variable 'child_gcs' [-Wunused-variable]
GCC-15 defines NT_ARM_GCS in the toolchain headers, causing gcs-util.h
to skip its fallback definition of struct user_gcs. This leads to the
compiler error.
Fix this by including <asm/ptrace.h> to provide the proper definition.
Fixes: a505a52b4e29 ("kselftest/arm64: Add a GCS test program built with the system libc")
Signed-off-by: Leo Yan <leo.yan@arm.com>
---
tools/testing/selftests/arm64/gcs/libc-gcs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/arm64/gcs/libc-gcs.c b/tools/testing/selftests/arm64/gcs/libc-gcs.c
index 17b2fabfec386e523e788d8bcfcafa553c93bd9b..72e82bfbecc99e34da71d56cf5401c137d6e9a48 100644
--- a/tools/testing/selftests/arm64/gcs/libc-gcs.c
+++ b/tools/testing/selftests/arm64/gcs/libc-gcs.c
@@ -16,6 +16,7 @@
#include <asm/hwcap.h>
#include <asm/mman.h>
+#include <asm/ptrace.h>
#include <linux/compiler.h>
---
base-commit: 4ee64205ffaa587e8114d84a67ac721399ccb369
change-id: 20260421-selftests_arm64_gcc15-15f6f6d07dd8
Best regards,
--
Leo Yan <leo.yan@arm.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] kselftest/arm64: Fix build failure with GCC-15
2026-04-22 17:01 [PATCH] kselftest/arm64: Fix build failure with GCC-15 Leo Yan
@ 2026-04-22 17:20 ` Mark Brown
2026-04-22 17:41 ` Leo Yan
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2026-04-22 17:20 UTC (permalink / raw)
To: Leo Yan
Cc: Catalin Marinas, Will Deacon, Shuah Khan, Thiago Jung Bauermann,
linux-arm-kernel, linux-kselftest, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 905 bytes --]
On Wed, Apr 22, 2026 at 06:01:39PM +0100, Leo Yan wrote:
> Building on Debian sid with GCC 15 fails:
> GCC-15 defines NT_ARM_GCS in the toolchain headers, causing gcs-util.h
> to skip its fallback definition of struct user_gcs. This leads to the
> compiler error.
Are you sure it's GCC and not libc? Anyway...
> tools/testing/selftests/arm64/gcs/libc-gcs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/arm64/gcs/libc-gcs.c b/tools/testing/selftests/arm64/gcs/libc-gcs.c
> index 17b2fabfec386e523e788d8bcfcafa553c93bd9b..72e82bfbecc99e34da71d56cf5401c137d6e9a48 100644
> --- a/tools/testing/selftests/arm64/gcs/libc-gcs.c
> +++ b/tools/testing/selftests/arm64/gcs/libc-gcs.c
> @@ -16,6 +16,7 @@
>
> #include <asm/hwcap.h>
> #include <asm/mman.h>
> +#include <asm/ptrace.h>
Shouldn't this be in gcs-util.h where the local definition is?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kselftest/arm64: Fix build failure with GCC-15
2026-04-22 17:20 ` Mark Brown
@ 2026-04-22 17:41 ` Leo Yan
0 siblings, 0 replies; 3+ messages in thread
From: Leo Yan @ 2026-04-22 17:41 UTC (permalink / raw)
To: Mark Brown
Cc: Catalin Marinas, Will Deacon, Shuah Khan, Thiago Jung Bauermann,
linux-arm-kernel, linux-kselftest, linux-kernel
On Wed, Apr 22, 2026 at 06:20:16PM +0100, Mark Brown wrote:
[...]
> > +++ b/tools/testing/selftests/arm64/gcs/libc-gcs.c
> > @@ -16,6 +16,7 @@
> >
> > #include <asm/hwcap.h>
> > #include <asm/mman.h>
> > +#include <asm/ptrace.h>
>
> Shouldn't this be in gcs-util.h where the local definition is?
Will update commit log and this one. Thanks for review!
Leo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-22 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 17:01 [PATCH] kselftest/arm64: Fix build failure with GCC-15 Leo Yan
2026-04-22 17:20 ` Mark Brown
2026-04-22 17:41 ` Leo Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox