aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/riscv/kernel/probes/simulate-insn.h
diff options
context:
space:
mode:
authorNam Cao <namcaov@gmail.com>2023-07-30 10:27:09 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2023-08-16 07:48:40 -0700
commitd943705fba3af1dec5a999cb3739949710a1aa90 (patch)
tree90d89c41bef1e61f555b6e32e55962f2d29bed2f /arch/riscv/kernel/probes/simulate-insn.h
parentriscv: kprobes: simulate c.jr and c.jalr instructions (diff)
downloadwireguard-linux-d943705fba3af1dec5a999cb3739949710a1aa90.tar.xz
wireguard-linux-d943705fba3af1dec5a999cb3739949710a1aa90.zip
riscv: kprobes: simulate c.beqz and c.bnez
kprobes currently rejects instruction c.beqz and c.bnez. Implement them. Signed-off-by: Nam Cao <namcaov@gmail.com> Reviewed-by: Charlie Jenkins <charlie@rivosinc.com> Link: https://lore.kernel.org/r/1d879dba4e4ee9a82e27625d6483b5c9cfed684f.1690704360.git.namcaov@gmail.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/probes/simulate-insn.h')
-rw-r--r--arch/riscv/kernel/probes/simulate-insn.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kernel/probes/simulate-insn.h b/arch/riscv/kernel/probes/simulate-insn.h
index 472a1948ec4f..44ebbc444db9 100644
--- a/arch/riscv/kernel/probes/simulate-insn.h
+++ b/arch/riscv/kernel/probes/simulate-insn.h
@@ -27,5 +27,7 @@ bool simulate_jalr(u32 opcode, unsigned long addr, struct pt_regs *regs);
bool simulate_c_j(u32 opcode, unsigned long addr, struct pt_regs *regs);
bool simulate_c_jr(u32 opcode, unsigned long addr, struct pt_regs *regs);
bool simulate_c_jalr(u32 opcode, unsigned long addr, struct pt_regs *regs);
+bool simulate_c_bnez(u32 opcode, unsigned long addr, struct pt_regs *regs);
+bool simulate_c_beqz(u32 opcode, unsigned long addr, struct pt_regs *regs);
#endif /* _RISCV_KERNEL_PROBES_SIMULATE_INSN_H */