svn commit: r322436 - head/sys/arm64/arm64

John Baldwin jhb at FreeBSD.org
Sat Aug 12 18:38:19 UTC 2017


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"));


More information about the svn-src-all mailing list