summaryrefslogtreecommitdiff
path: root/arch/csky/kernel/traps.c
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2020-04-02 19:52:27 +0800
committerGuo Ren <guoren@linux.alibaba.com>2020-04-03 11:37:51 +0800
commit8f6bb793b2be82f1f73bfb416486f156f70b4314 (patch)
tree783eef0d08ebaa652b335db205f99e970d4a2c0d /arch/csky/kernel/traps.c
parent33e53ae1ce413a081254e686d9b27cc1b3585e2f (diff)
downloadlinux-sh-8f6bb793b2be82f1f73bfb416486f156f70b4314.tar.gz
csky: Add uprobes support
This patch adds support for uprobes on csky architecture. Just like kprobe, it support single-step and simulate instructions. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'arch/csky/kernel/traps.c')
-rw-r--r--arch/csky/kernel/traps.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/csky/kernel/traps.c b/arch/csky/kernel/traps.c
index c6a40806977f..fcc3a69831ad 100644
--- a/arch/csky/kernel/traps.c
+++ b/arch/csky/kernel/traps.c
@@ -130,6 +130,10 @@ asmlinkage void trap_c(struct pt_regs *regs)
if (kprobe_single_step_handler(regs))
return;
#endif
+#ifdef CONFIG_UPROBES
+ if (uprobe_single_step_handler(regs))
+ return;
+#endif
info.si_code = TRAP_TRACE;
sig = SIGTRAP;
break;
@@ -139,6 +143,10 @@ asmlinkage void trap_c(struct pt_regs *regs)
if (kprobe_breakpoint_handler(regs))
return;
#endif
+#ifdef CONFIG_UPROBES
+ if (uprobe_breakpoint_handler(regs))
+ return;
+#endif
die_if_kernel("Kernel mode ILLEGAL", regs, vector);
#ifndef CONFIG_CPU_NO_USER_BKPT
if (*(uint16_t *)instruction_pointer(regs) != USR_BKPT)