* [PATCH v3] kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition
@ 2026-04-29 14:30 Leo Yan
2026-04-30 0:26 ` Mark Brown
2026-05-01 16:12 ` Catalin Marinas
0 siblings, 2 replies; 3+ messages in thread
From: Leo Yan @ 2026-04-29 14:30 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
kselftest includes kernel uAPI headers with option:
-isystem $(top_srcdir)/usr/include
Include <asm/ptrace.h> in libc-gcs.c for the definition of struct
user_gcs from the uAPI headers, and remove the redundant
definition in gcs-util.h.
Fixes: a505a52b4e29 ("kselftest/arm64: Add a GCS test program built with the system libc")
Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Changes in v3:
- Moved to include <asm/ptrace.h> in libc-gcs.c (Catalin).
- Removed the redundant definition in gcs-util.h (Catalin).
- Link to v2: https://lore.kernel.org/r/20260422-selftests_arm64_gcc15-v2-1-c0134de8838a@arm.com
Changes in v2:
- Refined commit log (Mark Brown).
- Moving header to gcs-util.h (Mark Brown).
- Link to v1: https://lore.kernel.org/r/20260422-selftests_arm64_gcc15-v1-1-0d919ea5ac5f@arm.com
---
tools/testing/selftests/arm64/gcs/gcs-util.h | 6 ------
tools/testing/selftests/arm64/gcs/libc-gcs.c | 1 +
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/tools/testing/selftests/arm64/gcs/gcs-util.h b/tools/testing/selftests/arm64/gcs/gcs-util.h
index c99a6b39ac147b4efbc9b5fbadb43daf4da2c85e..7a81bb07ed4b8b82ee90d93b336b26760703d55b 100644
--- a/tools/testing/selftests/arm64/gcs/gcs-util.h
+++ b/tools/testing/selftests/arm64/gcs/gcs-util.h
@@ -18,12 +18,6 @@
#ifndef NT_ARM_GCS
#define NT_ARM_GCS 0x410
-
-struct user_gcs {
- __u64 features_enabled;
- __u64 features_locked;
- __u64 gcspr_el0;
-};
#endif
/* Shadow Stack/Guarded Control Stack interface */
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 v3] kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition
2026-04-29 14:30 [PATCH v3] kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition Leo Yan
@ 2026-04-30 0:26 ` Mark Brown
2026-05-01 16:12 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-04-30 0:26 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: 367 bytes --]
On Wed, Apr 29, 2026 at 03:30:10PM +0100, Leo Yan wrote:
> kselftest includes kernel uAPI headers with option:
>
> -isystem $(top_srcdir)/usr/include
>
> Include <asm/ptrace.h> in libc-gcs.c for the definition of struct
> user_gcs from the uAPI headers, and remove the redundant
> definition in gcs-util.h.
Reviewed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition
2026-04-29 14:30 [PATCH v3] kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition Leo Yan
2026-04-30 0:26 ` Mark Brown
@ 2026-05-01 16:12 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2026-05-01 16:12 UTC (permalink / raw)
To: Will Deacon, Shuah Khan, Mark Brown, Thiago Jung Bauermann,
Leo Yan
Cc: linux-arm-kernel, linux-kselftest, linux-kernel
On Wed, 29 Apr 2026 15:30:10 +0100, Leo Yan wrote:
> kselftest includes kernel uAPI headers with option:
>
> -isystem $(top_srcdir)/usr/include
>
> Include <asm/ptrace.h> in libc-gcs.c for the definition of struct
> user_gcs from the uAPI headers, and remove the redundant
> definition in gcs-util.h.
>
> [...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition
https://git.kernel.org/arm64/c/bb7235e22688
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-01 16:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29 14:30 [PATCH v3] kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition Leo Yan
2026-04-30 0:26 ` Mark Brown
2026-05-01 16:12 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox