diff options
author | Guo Ren <guoren@linux.alibaba.com> | 2020-04-01 03:17:02 +0200 |
---|---|---|
committer | Guo Ren <guoren@linux.alibaba.com> | 2020-04-03 05:14:17 +0200 |
commit | 33e53ae1ce413a081254e686d9b27cc1b3585e2f (patch) | |
tree | dd6ddbf5a1707f1d0351143cedc00147a465abf4 /arch/csky/include/asm/ptrace.h | |
parent | csky: Enable LOCKDEP_SUPPORT (diff) | |
download | linux-33e53ae1ce413a081254e686d9b27cc1b3585e2f.tar.xz linux-33e53ae1ce413a081254e686d9b27cc1b3585e2f.zip |
csky: Add kprobes supported
This patch enable kprobes, kretprobes, ftrace interface. It utilized
software breakpoint and single step debug exceptions, instructions
simulation on csky.
We use USR_BKPT replace origin instruction, and the kprobe handler
prepares an excutable memory slot for out-of-line execution with a
copy of the original instruction being probed. Most of instructions
could be executed by single-step, but some instructions need origin
pc value to execute and we need software simulate these 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/include/asm/ptrace.h')
-rw-r--r-- | arch/csky/include/asm/ptrace.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/csky/include/asm/ptrace.h b/arch/csky/include/asm/ptrace.h index f16ca256e007..aae5aa96cf54 100644 --- a/arch/csky/include/asm/ptrace.h +++ b/arch/csky/include/asm/ptrace.h @@ -13,6 +13,8 @@ #define PS_S 0x80000000 /* Supervisor Mode */ +#define USR_BKPT 0x1464 + #define arch_has_single_step() (1) #define current_pt_regs() \ ({ (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1; }) |