amd64/124134: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Mon Dec 6 15:20:13 UTC 2010

The following reply was made to PR amd64/124134; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at
Subject: Re: amd64/124134: commit references a PR
Date: Mon,  6 Dec 2010 15:15:33 +0000 (UTC)

 Author: kib
 Date: Mon Dec  6 15:15:27 2010
 New Revision: 216231
   Do not leak %rdx value in the previous image to the new image after
   execve(2). Note that ia32 binaries already handle this properly,
   since ia32_setregs() resets td_retval[1], but not exec_setregs().
   We still do not conform to the amd64 ABI specification, since %rsp
   on the image startup is not aligned to 16 bytes.
   PR:	amd64/124134
   Discussed with:	Petr Salinger <Petr.Salinger seznam cz>
   	(who convinced me that there is indeed several bugs)
   MFC after:	1 week
 Modified: head/sys/amd64/amd64/machdep.c
 --- head/sys/amd64/amd64/machdep.c	Mon Dec  6 12:18:02 2010	(r216230)
 +++ head/sys/amd64/amd64/machdep.c	Mon Dec  6 15:15:27 2010	(r216231)
 @@ -876,6 +876,7 @@ exec_setregs(struct thread *td, struct i
  	regs->tf_fs = _ufssel;
  	regs->tf_gs = _ugssel;
  	regs->tf_flags = TF_HASSEGS;
 +	td->td_retval[1] = 0;
  	 * Reset the hardware debug registers if they were in use.
 svn-src-all at mailing list
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at"

More information about the freebsd-amd64 mailing list