Re: [PATCH v2 3/4] sparc64: kprobes: Resume after a delay slot at the saved next PC

From: Stian Halseth

Date: Fri Nov 13 2026 - 14:12:54 EST


On Fri, 2026-11-13 at 15:40 +0100, Stian Halseth wrote:
> After single-stepping an instruction that does not branch, execution
> resumes at the saved next PC. The probed address plus 8 comes next.
> For an instruction in the delay slot of a taken branch the saved next
> PC is the branch target. Execution then goes back to the probed
> address plus 8. It should continue at the target plus 4.
>
> Use the saved next PC plus 4. For any other instruction that is the
> probed address plus 8.
>
> Link: https://github.com/sparclinux/issues/issues/110
> Signed-off-by: Stian Halseth <stian@xxxxxx>

Fixes: f08825896664 ("[SPARC64]: Fix several kprobes bugs.")

Andreas, please add it when applying, or I'll fold it into a v3 if one
is needed.

/Stian

Attachment: signature.asc
Description: This is a digitally signed message part