summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/ptrace.h
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-10-10 18:50:03 +0400
committerCatalin Marinas <catalin.marinas@arm.com>2012-10-11 13:39:08 +0400
commit7606c37d4a447ea3b0efb2165d3ccf516b7d8696 (patch)
tree91b61e142e160dc67342291f1863d2333059174e /arch/arm64/include/asm/ptrace.h
parentf3d447a97f24f7c1e14767e1974b8e5bc219bc07 (diff)
downloadlinux-7606c37d4a447ea3b0efb2165d3ccf516b7d8696.tar.xz
arm64: Do not export the compat-specific definitions to the user
This patch adds #ifdef __KERNEL__ guards around the COMPAT_* definitions to avoid exporting them to user. AArch32 user requiring the kernel headers must use those generated with ARCH=arm. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/ptrace.h')
-rw-r--r--arch/arm64/include/asm/ptrace.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index 0fa5d6c9ef76..fc2772a27c78 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -23,6 +23,7 @@
#include <asm/hwcap.h>
+#ifdef __KERNEL__
/* AArch32-specific ptrace requests */
#define COMPAT_PTRACE_GETREGS 12
#define COMPAT_PTRACE_SETREGS 13
@@ -32,6 +33,7 @@
#define COMPAT_PTRACE_SETVFPREGS 28
#define COMPAT_PTRACE_GETHBPREGS 29
#define COMPAT_PTRACE_SETHBPREGS 30
+#endif
/*
* PSR bits
@@ -47,9 +49,11 @@
/* AArch32 CPSR bits */
#define PSR_MODE32_BIT 0x00000010
+#ifdef __KERNEL__
#define COMPAT_PSR_MODE_USR 0x00000010
#define COMPAT_PSR_T_BIT 0x00000020
#define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */
+#endif
/* AArch64 SPSR bits */
#define PSR_F_BIT 0x00000040
@@ -70,13 +74,15 @@
#define PSR_x 0x0000ff00 /* Extension */
#define PSR_c 0x000000ff /* Control */
+#ifdef __KERNEL__
/*
* These are 'magic' values for PTRACE_PEEKUSR that return info about where a
* process is located in memory.
*/
-#define PT_TEXT_ADDR 0x10000
-#define PT_DATA_ADDR 0x10004
-#define PT_TEXT_END_ADDR 0x10008
+#define COMPAT_PT_TEXT_ADDR 0x10000
+#define COMPAT_PT_DATA_ADDR 0x10004
+#define COMPAT_PT_TEXT_END_ADDR 0x10008
+#endif
#ifndef __ASSEMBLY__