Commit bb7235e2 authored by Leo Yan's avatar Leo Yan Committed by Catalin Marinas
Browse files

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: a505a52b ("kselftest/arm64: Add a GCS test program built with the system libc")
Signed-off-by: default avatarLeo Yan <leo.yan@arm.com>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 3ea44150
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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 */
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

#include <asm/hwcap.h>
#include <asm/mman.h>
#include <asm/ptrace.h>

#include <linux/compiler.h>