From owner-svn-src-head@freebsd.org Sat Aug 12 18:38:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8CCCDC48D9; Sat, 12 Aug 2017 18:38:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7306A6C7A9; Sat, 12 Aug 2017 18:38:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7CIcIJr017757; Sat, 12 Aug 2017 18:38:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7CIcIIn017756; Sat, 12 Aug 2017 18:38:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201708121838.v7CIcIIn017756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 12 Aug 2017 18:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322436 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 322436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2017 18:38:19 -0000 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"));