Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

From: Will Deacon
Date: Wed Nov 13 2013 - 09:20:53 EST


On Wed, Nov 13, 2013 at 01:58:07PM +0000, Peter Zijlstra wrote:
> On Mon, Nov 11, 2013 at 10:58:12AM +0000, Will Deacon wrote:
> > Single-stepping on x86 is different to the step behaviour on arm64 afaik. On
> > ARM, we have to manually remove the breakpoint, perform a single-step, then
> > add the breakpoint again. If we re-enable debug exceptions in the kprobe
> > handler, the step will complete early and we'll never step off the
> > breakpoint.
>
> This is about hardware breakpoints right? Which are per-cpu? Otherwise
> removing the breakpoint would open up a hole for another thread to slip
> through while you're single stepping.

Correct, but our hardware breakpoints don't have any resume feature, so they
have to be disabled on the relevant CPU, then stepped on that same CPU
before they can be reactivated.

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/