Skip to content

Commit bb7235e

Browse files
Leo-Yanctmarinas
authored andcommitted
kselftest/arm64: Include <asm/ptrace.h> for user_gcs definition
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. This fixes a compilation error on systems where the toolchain defines NT_ARM_GCS. Fixes: a505a52 ("kselftest/arm64: Add a GCS test program built with the system libc") Signed-off-by: Leo Yan <leo.yan@arm.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 3ea4415 commit bb7235e

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

tools/testing/selftests/arm64/gcs/gcs-util.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818

1919
#ifndef NT_ARM_GCS
2020
#define NT_ARM_GCS 0x410
21-
22-
struct user_gcs {
23-
__u64 features_enabled;
24-
__u64 features_locked;
25-
__u64 gcspr_el0;
26-
};
2721
#endif
2822

2923
/* Shadow Stack/Guarded Control Stack interface */

tools/testing/selftests/arm64/gcs/libc-gcs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <asm/hwcap.h>
1818
#include <asm/mman.h>
19+
#include <asm/ptrace.h>
1920

2021
#include <linux/compiler.h>
2122

0 commit comments

Comments
 (0)