Date: Sat, 12 Aug 2017 18:38:18 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322436 - head/sys/arm64/arm64 Message-ID: <201708121838.v7CIcIIn017756@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Sat Aug 12 18:38:18 2017 New Revision: 322436 URL: https://svnweb.freebsd.org/changeset/base/322436 Log: Don't panic for PT_GETFPREGS. Only fetch the VFP state from the CPU if the thread whose registers are being requested is the current thread. If a stopped thread's registers are being fetched by a debugger, the saved state in the PCB is already valid. Reviewed by: andrew MFC after: 1 week Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sat Aug 12 18:28:02 2017 (r322435) +++ head/sys/arm64/arm64/machdep.c Sat Aug 12 18:38:18 2017 (r322436) @@ -222,7 +222,8 @@ fill_fpregs(struct thread *td, struct fpreg *regs) * If we have just been running VFP instructions we will * need to save the state to memcpy it below. */ - vfp_save_state(td, pcb); + if (td == curthread) + vfp_save_state(td, pcb); KASSERT(pcb->pcb_fpusaved == &pcb->pcb_fpustate, ("Called fill_fpregs while the kernel is using the VFP"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708121838.v7CIcIIn017756>