riscv: kgdb: Fix break size, insn patch and masking
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | riscv: kgdb: use patch_insn_write() to set breakpointsarch/ | +29 | 0 replies | |
| 2/3 | riscv: kgdb: use BREAK_INSTR_SIZE instead of hardcoded valuearch/ | +1 | 0 replies | |
| 3/3 | riscv: kgdb: clear bit 0 of single-step jump targetsarch/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] riscv: kgdb: Fix break size, insn patch and masking
This small series fixes a few problems that were spotted with kgdb.
First patch is the use of patch_insn_write() to set breakpoints instead of copy_to_kernel_nofault(). This fixes the use of kgdb with CONFIG_STRICT_KERNEL_RWX which maps text as RX.
Second patch removes the hardcoded epc += 4 with BREAK_INSTR_SIZE so that it works with CONFIG_RISCV_ISA_C.
Last one is more of a correctness fix with respect to jalr instructions. ISA specifies that the target address is computed by masking the LSB to 0.
Clément Léger (3):
riscv: kgdb: use patch_insn_write() to set breakpoints
riscv: kgdb: use BREAK_INSTR_SIZE instead of hardcoded value
riscv: kgdb: clear bit 0 of single-step jump targets
arch/riscv/kernel/kgdb.c | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-)
Signature · 1 line
Clément Léger