HomeFreeBSD

Read the arm64 far early in el0 exceptions

Description

Read the arm64 far early in el0 exceptions

When handling userspace exceptions on arm64 we need to dereference the
current thread pointer. If this is being promoted/demoted there is a
small window where it will cause another exception to be hit. As this
second exception will set the fault address register we will read the
incorrect value in the userspace exception handler.

Fix this be always reading the fault address before dereferencing the
current thread pointer.

Reported by: olivier@
Reviewed by: markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D38196

(cherry picked from commit f29942229d24ebb8b98f8c5d02f3c8632648007e)

Details

Provenance
andrewAuthored on Jan 25 2023, 5:47 PM
Reviewer
markj
Differential Revision
D38196: Read the arm64 far early in el0 exceptions
Parents
rG603cdb0f092c: linux(4): Attach netlink on i386.
Branches
Unknown
Tags
Unknown