1. 31 8月, 2011 2 次提交
  2. 06 12月, 2010 2 次提交
    • W
      ARM: hw_breakpoint: unify single-stepping code for watchpoints and breakpoints · 9ebb3cbc
      Will Deacon 提交于
      The single-stepping code is currently different depending on whether
      we are stepping over a breakpoint or a watchpoint. There is no good
      reason for this, so let's sort it out.
      
      This patch adds functions for enabling/disabling single-step for
      a particular hw_breakpoint and integrates this with the exception
      handling code.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      9ebb3cbc
    • W
      ARM: hw_breakpoint: do not allocate new breakpoints with preemption disabled · 93a04a34
      Will Deacon 提交于
      The watchpoint single-stepping code calls register_user_hw_breakpoint to
      register a mismatch breakpoint for stepping over the watchpoint. This is
      performed with preemption disabled, which is unsafe as we may end up scheduling
      whilst in_atomic(). Furthermore, using the perf API is rather overkill since
      we are already in the hw-breakpoint backend and only require access to reserved
      breakpoints anyway.
      
      This patch reworks the watchpoint stepping code so that we don't require
      another perf_event for the mismatch breakpoint. Instead, we hold a separate
      arch_hw_breakpoint_ctrl struct inside the watchpoint which is used exclusively
      for stepping. We can check whether or not stepping is enabled when installing
      or uninstalling the watchpoint and operate on the breakpoint accordingly.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      93a04a34
  3. 08 9月, 2010 2 次提交
    • W
      ARM: 6357/1: hw-breakpoint: add new ptrace requests for hw-breakpoint interaction · 864232fa
      Will Deacon 提交于
      For debuggers to take advantage of the hw-breakpoint framework in the kernel,
      it is necessary to expose the API calls via a ptrace interface.
      
      This patch exposes the hardware breakpoints framework as a collection of
      virtual registers, accesible using PTRACE_SETHBPREGS and PTRACE_GETHBPREGS
      requests. The breakpoints are stored in the debug_info struct of the running
      thread.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: S. Karthikeyan <informkarthik@gmail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      864232fa
    • W
      ARM: 6356/1: hw-breakpoint: add ARM backend for the hw-breakpoint framework · f81ef4a9
      Will Deacon 提交于
      The hw-breakpoint framework in the kernel requires architecture-specific
      support in order to install, remove, validate and manage hardware
      breakpoints.
      
      This patch adds initial support for this framework to the ARM architecture,
      but restricts the number of watchpoints to a single resource to get around
      the fact that the Data Fault Address Register is unknown when a watchpoint
      debug exception is taken.
      
      On cores with v7 debug, the Kernel can handle breakpoint and watchpoint
      exceptions occuring from userspace. Older cores require clients to handle
      the exception themselves by registering an appropriate overflow handler
      or, in the case of ptrace, handling the raised SIGTRAP.
      
      The memory-mapped extended debug interface is unsupported due to its
      unreliability in real implementations.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: S. Karthikeyan <informkarthik@gmail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f81ef4a9