diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-10-10 10:50:03 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-10-11 05:39:08 -0400 |
commit | 7606c37d4a447ea3b0efb2165d3ccf516b7d8696 (patch) | |
tree | 91b61e142e160dc67342291f1863d2333059174e /arch/arm64/kernel | |
parent | f3d447a97f24f7c1e14767e1974b8e5bc219bc07 (diff) |
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/kernel')
-rw-r--r-- | arch/arm64/kernel/ptrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index ac3550ecc7b5..2ea3968367c2 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c | |||
@@ -823,11 +823,11 @@ static int compat_ptrace_read_user(struct task_struct *tsk, compat_ulong_t off, | |||
823 | if (off & 3) | 823 | if (off & 3) |
824 | return -EIO; | 824 | return -EIO; |
825 | 825 | ||
826 | if (off == PT_TEXT_ADDR) | 826 | if (off == COMPAT_PT_TEXT_ADDR) |
827 | tmp = tsk->mm->start_code; | 827 | tmp = tsk->mm->start_code; |
828 | else if (off == PT_DATA_ADDR) | 828 | else if (off == COMPAT_PT_DATA_ADDR) |
829 | tmp = tsk->mm->start_data; | 829 | tmp = tsk->mm->start_data; |
830 | else if (off == PT_TEXT_END_ADDR) | 830 | else if (off == COMPAT_PT_TEXT_END_ADDR) |
831 | tmp = tsk->mm->end_code; | 831 | tmp = tsk->mm->end_code; |
832 | else if (off < sizeof(compat_elf_gregset_t)) | 832 | else if (off < sizeof(compat_elf_gregset_t)) |
833 | return copy_regset_to_user(tsk, &user_aarch32_view, | 833 | return copy_regset_to_user(tsk, &user_aarch32_view, |