Page MenuHomeFreeBSD

Always read the VFP regs in the arm64 fill_fpregs
ClosedPublic

Authored by andrew on Jan 9 2023, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 4, 3:18 PM
Unknown Object (File)
Fri, Oct 3, 7:49 PM
Unknown Object (File)
Sep 4 2025, 7:47 PM
Unknown Object (File)
Sep 4 2025, 12:55 PM
Unknown Object (File)
Sep 2 2025, 3:45 AM
Unknown Object (File)
Aug 31 2025, 6:11 PM
Unknown Object (File)
Aug 21 2025, 1:42 PM
Unknown Object (File)
Aug 8 2025, 11:39 PM
Subscribers

Details

Summary

The PCB_FP_STARTED is used to indicate that the current VFP context
has been used since either 1. the start of the thread, or 2. exiting
a kernel FP context.

When case 2 was added to the kernel this could cause incorrect results
to be returned when a thread exits the kernel FP context and fill_fpregs
is called before it has restored the VFP state, e.g. by trappin on a
userspace VFP instruction.

In both of the cases the base save area is still valid so reduce the
use of the PCB_FP_STARTED flag check to help decide if we need to
store the current threads VFP state.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable