riscv: kprobes: simulate c.jr and c.jalr instructions
authorNam Cao <namcaov@gmail.com>
Sun, 30 Jul 2023 08:27:08 +0000 (10:27 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 16 Aug 2023 14:48:39 +0000 (07:48 -0700)
commitb18256d9b744497410bc124a94a546c5eef579eb
treeb4a75846af5e3207be54836a4b156ca37742a574
parenta93892974f2e46bed59b366133f3ef60d70d3b66
riscv: kprobes: simulate c.jr and c.jalr instructions

kprobes currently rejects c.jr and c.jalr instructions. Implement them.

Signed-off-by: Nam Cao <namcaov@gmail.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/db8b7787e9208654cca50484f68334f412be2ea9.1690704360.git.namcaov@gmail.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/probes/decode-insn.c
arch/riscv/kernel/probes/simulate-insn.c
arch/riscv/kernel/probes/simulate-insn.h