Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2018 20:42:54 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r340017 - stable/11/sys/arm64/arm64
Message-ID:  <201811012042.wA1KgswL086253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Nov  1 20:42:54 2018
New Revision: 340017
URL: https://svnweb.freebsd.org/changeset/base/340017

Log:
  MFC 338813: Clear all of the VFP state in fill_fpregs().
  
  Zero the entire FP register set structure returned for ptrace() if a
  thread hasn't used FP registers rather than leaking garbage in the
  fp_sr and fp_cr fields.

Modified:
  stable/11/sys/arm64/arm64/machdep.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm64/arm64/machdep.c
==============================================================================
--- stable/11/sys/arm64/arm64/machdep.c	Thu Nov  1 18:34:26 2018	(r340016)
+++ stable/11/sys/arm64/arm64/machdep.c	Thu Nov  1 20:42:54 2018	(r340017)
@@ -222,7 +222,7 @@ fill_fpregs(struct thread *td, struct fpreg *regs)
 		regs->fp_sr = pcb->pcb_fpsr;
 	} else
 #endif
-		memset(regs->fp_q, 0, sizeof(regs->fp_q));
+		memset(regs, 0, sizeof(*regs));
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811012042.wA1KgswL086253>