summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorXiaofeng Yuan <xiaofengmian@163.com>2026-08-07 19:24:29 -0600
committerPaul Walmsley <pjw@kernel.org>2026-08-07 19:24:29 -0600
commit540ad5ad05a5945575b154caedfcdc08ed75b810 (patch)
tree0dc613c711b4ce5f78beafbfda3dd781a46c85c6 /scripts/stackusage
parent6a48dea3449c220b1c607ecdad4d1cd18eac9b78 (diff)
downloadlinux-540ad5ad05a5945575b154caedfcdc08ed75b810.tar.gz
linux-540ad5ad05a5945575b154caedfcdc08ed75b810.zip
riscv: probes: simulate c.jal instruction
The c.jal instruction is currently marked REJECTED in kprobes instruction decoding, but it should be SIMULATED like other compressed jump instructions. Add simulate_c_jal() which saves the return address to RA and sets the program counter to the target offset, reusing simulate_c_j for the common jump logic. Although c.jal is RV32-only, the function compiles unconditionally. On RV64, riscv_insn_is_c_jal() always returns 0, so the simulation code is never invoked and the small overhead in kernel size is acceptable. Signed-off-by: Xiaofeng Yuan <xiaofengmian@163.com> Reviewed-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Tested-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Reviewed-by: Nam Cao <namcao@linutronix.de> Tested-by: Nam Cao <namcao@linutronix.de> Link: https://patch.msgid.link/20260701081033.49871-2-xiaofengmian@163.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions