arm64: Better native ptrace support for compat tasks 27/218027/2
authorCatalin Marinas <catalin.marinas@arm.com>
Tue, 14 Jul 2015 15:20:17 +0000 (16:20 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 19 Nov 2019 02:17:10 +0000 (11:17 +0900)
commitc8ca377a40c0183c83d9f874d8e627ac1457fa2d
treefd1f79cf94cbb4b6a1b4c418b031d85299d4f25c
parent865f4487ec93a231fde4599b23e7ce0500ef31c7
arm64: Better native ptrace support for compat tasks

The compat ptrace interface allows access to the TLS register, hardware
breakpoints and watchpoints, syscall number. However, a native task
using the native ptrace interface to debug compat tasks (e.g. multi-arch
gdb) only has access to the general and VFP register sets. The compat
ptrace interface cannot be accessed from a native task.

This patch adds a new user_aarch32_ptrace_view which contains the TLS,
hardware breakpoint/watchpoint and syscall number regsets in addition to
the existing GPR and VFP regsets. This view is backwards compatible with
the previous kernels. Core dumping of 32-bit tasks and compat ptrace are
not affected since the original user_aarch32_view is preserved.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Yao Qi <yao.qi@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
[sw0312.kim: backport mainline commit 5d220ff9420f for better compat ptrace]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If027981a787610a0fa01389280f5d63e0c0c8e80
arch/arm64/kernel/ptrace.c