Skip to content

Commit 9d0e75e

Browse files
deepak0414Paul Walmsley
authored andcommitted
riscv/kernel: update __show_regs() to print shadow stack register
Update __show_regs() to print the captured shadow stack pointer. On tasks where shadow stack is disabled, simply print 0. Signed-off-by: Deepak Gupta <debug@rivosinc.com> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Tested-by: Andreas Korb <andreas.korb@aisec.fraunhofer.de> # QEMU, custom CVA6 Tested-by: Valentin Haudiquet <valentin.haudiquet@canonical.com> Link: https://patch.msgid.link/20251112-v5_user_cfi_series-v23-18-b55691eacf4f@rivosinc.com [pjw@kernel.org: cleaned up patch description] Signed-off-by: Paul Walmsley <pjw@kernel.org>
1 parent 66c9c71 commit 9d0e75e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/riscv/kernel/process.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ void __show_regs(struct pt_regs *regs)
9393
regs->s8, regs->s9, regs->s10);
9494
pr_cont(" s11: " REG_FMT " t3 : " REG_FMT " t4 : " REG_FMT "\n",
9595
regs->s11, regs->t3, regs->t4);
96-
pr_cont(" t5 : " REG_FMT " t6 : " REG_FMT "\n",
97-
regs->t5, regs->t6);
96+
pr_cont(" t5 : " REG_FMT " t6 : " REG_FMT " ssp : " REG_FMT "\n",
97+
regs->t5, regs->t6, get_active_shstk(current));
9898

9999
pr_cont("status: " REG_FMT " badaddr: " REG_FMT " cause: " REG_FMT "\n",
100100
regs->status, regs->badaddr, regs->cause);

0 commit comments

Comments
 (0)