HomeFreeBSD

aarch64: Fix get_fpcontext32() to work on non-curthread.

Description

aarch64: Fix get_fpcontext32() to work on non-curthread.

Similar to fill_fpregs(), only invoke vfp_save_state() for curthread.

While here, zero the buffer if FP hasn't been started to avoid leaking
kernel stack memory.

Reviewed by: andrew, markj
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D34525

(cherry picked from commit a47fd6929fe2008e28e3e697e449fb0904258d04)

Details

Provenance
jhbAuthored on Mar 23 2022, 8:33 PM
Reviewer
andrew
Differential Revision
D34525: aarch64: Fix get_fpcontext32() to work on non-curthread.
Parents
rG6c2ea7f890b1: gcore: Use PT_GETREGSET to fetch NT_PRSTATUS and NT_FPREGSET.
Branches
Unknown
Tags
Unknown