HomeFreeBSD

arm64: Clear td_frame when returning to userspace

Description

arm64: Clear td_frame when returning to userspace

When returning from an exception to userspace clear the saved td_frame.
On the next exception this should point to the frame, however this is
not guaranteed.

To ensure the trap frame pointer is either valid or NULL clear it
before returning to userspace in the EL0 synchronous exception handler.

Reviewed by: kib, markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D44807

(cherry picked from commit 4eec584d79c1e8375d863c7eec7229ac7ec3f13b)

Details

Provenance
andrewAuthored on Jun 12 2024, 1:08 PM
Reviewer
kib
Differential Revision
D44807: arm64: Clear td_frame when returning to userspace
Parents
rGd5e29c62e923: linux64: Fix the build on arm64 with bti checking
Branches
Unknown
Tags
Unknown