[PATCH 0/3] riscv: kprobes: simulate some instructions

Nam Cao namcaov at gmail.com
Sun Jul 30 01:27:06 PDT 2023


Simulate some currently rejected instructions. Still to be simulated are:
    - c.jal
    - c.ebreak

Nam Cao (3):
  riscv: kprobes: simulate c.j instruction
  riscv: kprobes: simulate c.jr and c.jalr instructions
  riscv: kprobes: simulate c.beqz and c.bnez

 arch/riscv/kernel/probes/decode-insn.c   |  11 +-
 arch/riscv/kernel/probes/simulate-insn.c | 105 +++++++++
 arch/riscv/kernel/probes/simulate-insn.h |   5 +
 drivers/test_kprobe/Makefile             |   3 +
 drivers/test_kprobe/test_kprobe.c        | 265 +++++++++++++++++++++++
 5 files changed, 384 insertions(+), 5 deletions(-)
 create mode 100644 drivers/test_kprobe/Makefile
 create mode 100644 drivers/test_kprobe/test_kprobe.c

-- 
2.34.1




More information about the linux-riscv mailing list