Skip to content

ARM: v7m: handle faults and enable debugging

Ben Wolsieffer linux-arm-kernel lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/22 patches 0 repliesNew
  2. v1 posting 1/22 patches 1 replySuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ARM: v7m: handle faultsarch/arm/include/asm/v7m.h arch/arm/kernel/Makefile arch/arm/kernel/entry-v7m.S +1 more+250 -50 replies
2/2ARM: v7m: support undefined instruction hooksarch/arm/include/asm/traps.h arch/arm/kernel/traps-v7m.c+9 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RESEND 0/2] ARM: v7m: handle faults and enable debugging

This series enables real exception handlers on no-MMU systems, increasing robustness in the face of buggy user- or kernel-space software. Previously, any fault would trigger the invalid exception handler, which would hang the system. With this series, faults only kill the offending process and allow the rest of the system to continue operating.

The second patch in this series adds support for undefined instruction hooks, enabling software breakpoints through ptrace. Using this functionality currently requires a patch to gdb.

This series has been tested on an STM32F746 (Cortex-M7).

I would appreciate feedback in particular on the following questions:
* Is the fault table formatting acceptable? Or should the lines be wrapped/shortened?
* Does my chosen mapping between faults and signals make sense?

This time around this series has been sent to linux-stm32 as well, as I was previously unaware of that list.

Ben Wolsieffer (2):
ARM: v7m: handle faults
ARM: v7m: support undefined instruction hooks

 arch/arm/include/asm/traps.h |   2 +
 arch/arm/include/asm/v7m.h   |  29 +++++++
 arch/arm/kernel/Makefile     |   2 +-
 arch/arm/kernel/entry-v7m.S  |  68 ++++++++++++++-
 arch/arm/kernel/traps-v7m.c  | 162 +++++++++++++++++++++++++++++++++++
 5 files changed, 258 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/kernel/traps-v7m.c
Signature · 1 line
2.38.1