aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPratyush Anand <panand@redhat.com>2014-12-25 17:46:28 +0530
committerSteven Capper <steve.capper@linaro.org>2015-04-07 12:58:39 +0100
commit566a5ddfd55e1f2864ae7d1bc85413f52c087d44 (patch)
tree398ebb6dec717e89bb6037537015cc740a4438c3
parentf58abc2b6c4d0c0eb42e06e502b25a2f97efb903 (diff)
downloadlinux-566a5ddfd55e1f2864ae7d1bc85413f52c087d44.tar.gz
ARM64: Handle TRAP_HWBRKPT for user mode as well
uprobe registers a handler at step_hook. So, single_step_handler now checks for user mode as well if there is a valid hook. Signed-off-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Steve Capper <steve.capper@linaro.org> Conflicts: arch/arm64/kernel/debug-monitors.c
-rw-r--r--arch/arm64/kernel/debug-monitors.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index dae7bb45894..6ffa05d9738 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -238,6 +238,9 @@ static int single_step_handler(unsigned long addr, unsigned int esr,
if (!reinstall_suspended_bps(regs))
return 0;
+ if (call_step_hook(regs, esr) == DBG_HOOK_HANDLED)
+ return 0;
+
if (user_mode(regs)) {
info.si_signo = SIGTRAP;
info.si_errno = 0;