HomeFreeBSD

Arch64: Clear VFP state on execve()

Description

Arch64: Clear VFP state on execve()

I noticed that many of the math-related tests were failing on AArch64.
After a lot of debugging, I noticed that the floating point exception flags
were not being reset when starting a new process. This change resets the
VFP inside exec_setregs() to ensure no VFP register state is leaked from
parent processes to children.

This commit also moves the clearing of fpcr that was added in 65618fdda0f27
from fork() to execve() since that makes more sense: fork() can retain
current register values, but execve() should result in a well-defined
clean state.

Reviewed By: andrew
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29060

Details

Provenance
arichardsonAuthored on Mar 9 2021, 7:11 PM
Reviewer
andrew
Differential Revision
D29060: Arch64: Clear VFP state on execve()
Parents
rGdfb33cb0ef48: Allocating the LinuxKPI current structure from a software interrupt thread
Branches
Unknown
Tags
Unknown