]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dtrace/powerpc: "Fix" stack traces across trap frames
authorJustin Hibbits <jhibbits@FreeBSD.org>
Sat, 11 Mar 2023 16:30:00 +0000 (11:30 -0500)
committerJustin Hibbits <jhibbits@FreeBSD.org>
Wed, 15 Mar 2023 20:27:37 +0000 (16:27 -0400)
commitfcd94047f33beb98f1eee4d09e29d6c8de31c4a6
tree819fe316abc25b01f5cf8bd9eff5e8a374d62dc5
parent5e49311e0177932e0f0323fd547eedb4e50bbb4d
dtrace/powerpc: "Fix" stack traces across trap frames

In function boundary tracing the link register is not yet saved to the
save stack location, so the save point contains whatever the previous
'lr' save was, or even garbage, at the time the trap is taken.  Address
this by explicitly loading the link register from the trap frame instead
of the stack, and propagate that out.

Approved by: re (cperciva)

(cherry picked from commit 3e1155ade1baab51458374efd0295bdf6db455fc)
(cherry picked from commit e620e088cbd1c062655eee825aaf4f80bd255e1f)
(cherry picked from commit 0a21a6659e5dfe503da587fb0460ae19bd765859)
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c