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"));
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to