[PATCH] arm64: kgdb: Ensure atomic single-step execution

Mark Rutland mark.rutland at arm.com
Wed Oct 8 04:19:22 PDT 2025


On Wed, Oct 08, 2025 at 09:01:22AM +0800, Li Mengchen wrote:
> I am writing to address a persistent issue in the community’s code
> related to single-step tracing, which has remained unresolved for over
> a decade. The code I have provided has been extensively tested and
> proven to work across multiple hardware platforms and kernel versions,
> from 3.10 to the latest releases. Its correctness and effectiveness
> are not up for debate.

There is no debate; it is a statement of fact that those changes are
incomplete (e.g. failing to address other asynchronous exceptions),
incorrect (e.g. erroneously *unmasking* interrupts in some cases), and
contain unjustified changes which are themselves incorrect (e.g. using
task_pt_regs(), which *never* contains kernel register state).

I appreciate that those changes may be sufficient in the scenarios that
you have tested, but as I have already commented (with examples), there
are real scenarios where those changes make matters worse.

I agree that there are some longstanding issues here, but (as-is) the
changes you have proposed are not a suitable solution.

Mark.



More information about the linux-arm-kernel mailing list