Skip to content

ARM: hw_breakpoint: fixes and improvements (v3)

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11ARM: hw_breakpoint: ensure OS lock is clear before writing to debug registersarch/arm/kernel/hw_breakpoint.c+22 -50 replies
2/11ARM: hw_breakpoint: reset control registers in hotplug patharch/arm/kernel/hw_breakpoint.c+15 -10 replies
3/11ARM: hw_breakpoint: correct and simplify alignment fixup codearch/arm/kernel/hw_breakpoint.c+31 -260 replies
4/11ARM: hw_breakpoint: disable preemption during debug exception handlingarch/arm/kernel/entry-armv.S arch/arm/kernel/entry-header.S arch/arm/kernel/hw_breakpoint.c+36 -50 replies
5/11ARM: hw_breakpoint: don't advertise reserved breakpointsarch/arm/kernel/hw_breakpoint.c+117 -890 replies
6/11ARM: hw_breakpoint: do not allocate new breakpoints with preemption disabledarch/arm/include/asm/hw_breakpoint.h arch/arm/kernel/hw_breakpoint.c+78 -580 replies
7/11ARM: hw_breakpoint: unify single-stepping code for watchpoints and breakpointsarch/arm/include/asm/hw_breakpoint.h arch/arm/kernel/hw_breakpoint.c+42 -430 replies
8/11ARM: hw_breakpoint: disallow per-cpu breakpoints without overflow handlerarch/arm/kernel/hw_breakpoint.c+4 -20 replies
9/11ARM: ptrace: fix style issue with hw_breakpoint interfacearch/arm/kernel/ptrace.c+2 -20 replies
10/11ARM: hw_breakpoint: fix warnings generated by sparsearch/arm/kernel/hw_breakpoint.c+13 -71 reply
10/11ARM: hw_breakpoint: fix warnings generated by sparse+0 -00 replies
11/11ARM: hw_breakpoint: do not fail initcall if monitor mode is disabledarch/arm/kernel/hw_breakpoint.c+11 -110 replies

Reviews trailers per patch

1 of 12 patches has a Reviewed-by or Acked-by.

PatchCatalin Marinas
1/11
2/11
3/11
4/11A-b
5/11
6/11
7/11
8/11
9/11
10/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/11] ARM: hw_breakpoint: fixes and improvements (v3)

Hello again,

This is version 3 of the patchset originally posted here:

[v1]: http://lists.infradead.org/pipermail/linux-arm-kernel/2010-November/032717.html
[v2]: http://lists.infradead.org/pipermail/linux-arm-kernel/2010-November/032962.html

It's grown a bit since v2, but I think I've caught all of the corner cases now. Thanks to the people who have highlighted any problems.

Changes since v2 include:

* Unified single-stepping mechanism for watchpoints and breakpoints

* Corrected misdiagnosis of the problem fixed in patch 6 (`do not allocate...')

* For cores where monitor mode cannot be enabled due to hardware restrictions, we no longer fail the initcall or WARN_ONCE.

* Per-cpu breakpoints are disallowed for the time being because they cannot be stepped reliably (since we may take an interrupt before the step has completed).

* Updated the comment describing why only a single watchpoint is available.

As per usual, all feedback is welcome.

Will Deacon (11):
ARM: hw_breakpoint: ensure OS lock is clear before writing to debug
registers
ARM: hw_breakpoint: reset control registers in hotplug path
ARM: hw_breakpoint: correct and simplify alignment fixup code
ARM: hw_breakpoint: disable preemption during debug exception
handling
ARM: hw_breakpoint: don't advertise reserved breakpoints
ARM: hw_breakpoint: do not allocate new breakpoints with preemption
disabled
ARM: hw_breakpoint: unify single-stepping code for watchpoints and
breakpoints
ARM: hw_breakpoint: disallow per-cpu breakpoints without overflow
handler
ARM: ptrace: fix style issue with hw_breakpoint interface
ARM: hw_breakpoint: fix warnings generated by sparse
ARM: hw_breakpoint: do not fail initcall if monitor mode is disabled

 arch/arm/include/asm/hw_breakpoint.h |    4 +-
 arch/arm/kernel/entry-armv.S         |    4 +
 arch/arm/kernel/entry-header.S       |   19 ++
 arch/arm/kernel/hw_breakpoint.c      |  545 ++++++++++++++++++++--------------
 arch/arm/kernel/ptrace.c             |    4 +-
 5 files changed, 349 insertions(+), 227 deletions(-)