diff options
author | Guo Ren <guoren@linux.alibaba.com> | 2020-04-14 20:14:12 +0800 |
---|---|---|
committer | Guo Ren <guoren@linux.alibaba.com> | 2020-05-13 17:55:05 +0800 |
commit | c2e59d1f4df8783856a4e6a05a7d4a76d7cf7082 (patch) | |
tree | b4668a9c98af02140494cb7ae5ee84702f3d5c22 /arch/csky/kernel/probes | |
parent | bd11aabd35287b6961d197539aa61da5ab8fc0d7 (diff) | |
download | lwn-c2e59d1f4df8783856a4e6a05a7d4a76d7cf7082.tar.gz lwn-c2e59d1f4df8783856a4e6a05a7d4a76d7cf7082.zip |
csky: Fixup perf probe -x hungup
case:
# perf probe -x /lib/libc-2.28.9000.so memcpy
# perf record -e probe_libc:memcpy -aR sleep 1
System hangup and cpu get in trap_c loop, because our hardware
singlestep state could still get interrupt signal. When we get in
uprobe_xol singlestep slot, we should disable irq in pt_regs->psr.
And is_swbp_insn() need a csky arch implementation with a low 16bit
mask.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'arch/csky/kernel/probes')
-rw-r--r-- | arch/csky/kernel/probes/uprobes.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/csky/kernel/probes/uprobes.c b/arch/csky/kernel/probes/uprobes.c index b3a56c260e3e..1a9e0961b2b5 100644 --- a/arch/csky/kernel/probes/uprobes.c +++ b/arch/csky/kernel/probes/uprobes.c @@ -11,6 +11,11 @@ #define UPROBE_TRAP_NR UINT_MAX +bool is_swbp_insn(uprobe_opcode_t *insn) +{ + return (*insn & 0xffff) == UPROBE_SWBP_INSN; +} + unsigned long uprobe_get_swbp_addr(struct pt_regs *regs) { return instruction_pointer(regs); |