riscv: kprobes: Remove redundant kprobe_step_ctx
authorJisheng Zhang <jszhang@kernel.org>
Sun, 18 Apr 2021 16:29:19 +0000 (00:29 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 29 May 2021 18:17:08 +0000 (11:17 -0700)
commit8c9f4940c27dd72ee68ca5af2922e4d83ca9121b
tree502c7a84b720d1a39c3e0c1c5a0b24514a55b2ce
parent37a7a2a10ec525a79d733008bc7fe4ebbca34382
riscv: kprobes: Remove redundant kprobe_step_ctx

Inspired by commit ba090f9cafd5 ("arm64: kprobes: Remove redundant
kprobe_step_ctx"), the ss_pending and match_addr of kprobe_step_ctx
are redundant because those can be replaced by KPROBE_HIT_SS and
&cur_kprobe->ainsn.api.insn[0] + GET_INSN_LENGTH(cur->opcode)
respectively.

Remove the kprobe_step_ctx to simplify the code.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/kprobes.h
arch/riscv/kernel/probes/kprobes.c