Skip to content

riscv: Fix debug instruction check and support trap-based WARN()

Vincent Chen linux-riscv lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3riscv: Add the support for c.ebreak check in is_valid_bugaddr()arch/riscv/include/asm/bug.h arch/riscv/kernel/traps.c+11 -40 replies
2/3riscv: Support BUG() in kernel modulearch/riscv/kernel/traps.c+1 -10 replies
3/3riscv: Make WARN() related functions able to trigger a trap exceptionarch/riscv/include/asm/bug.h arch/riscv/kernel/traps.c+34 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] riscv: Fix debug instruction check and support trap-based WARN()

The handler for the debug exception will call is_valid_bugaddr(bugaddr) to check if the instruction in bugaddr is a real debug instruction. However, the expected instruction, ebreak, is possibly translated to c.ebreak by assmebler when C extension is supported. This patchset will add c.ebreak into the check mechanism. In addition, BUG() is currently unable to work in the kernel module due to an inappropriated condition in is_valid_bugaddr(). This issue will be fixed in this patchset. Finally, this patchset enables WARN() related functions to trap the code to help developers debug it.

Vincent Chen (3):
riscv: Add the support for c.ebreak check in is_valid_bugaddr()
riscv: Support BUG() in kernel module
riscv: Make WARN() related functions able to trigger a trap exception

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv