Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2010 15:20:13 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-amd64@FreeBSD.org
Subject:   Re: amd64/124134: commit references a PR
Message-ID:  <201012061520.oB6FKDZ5032559@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR amd64/124134; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
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
 URL: http://svn.freebsd.org/changeset/base/216231
 
 Log:
   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
 
 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@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



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