Re: [PATCH v4] riscv: probes: simulate c.jal instruction

From: Nam Cao

Date: Sat Jun 27 2026 - 07:00:24 EST


Charlie Jenkins <thecharlesjenkins@xxxxxxxxx> writes:
> I was looking at this recently trying to figure out why this hadn't been
> implemented and couldn't determine why this one was special, it might be
> because it is 32-bit only.

Yes. When I looked into this, I had no idea how to test rv32, so I skipped it.

> Since it is 32-bit only, can you put ifdefs
> around it for riscv32 (#if __riscv_xlen == 32) ?

Except for slightly bigger kernel size, it does not hurt to keep. And
#if stuff is quite ugly. But I'm fine with it either way.

> Can you also add a test case to:
> arch/riscv/kernel/tests/kprobes/test-kprobes-asm.S?

I already have a patch adding test case. Let me send it.

Nam