kern/182161: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Tue Sep 24 12:30:01 UTC 2013


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

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: kern/182161: commit references a PR
Date: Tue, 24 Sep 2013 12:24:55 +0000 (UTC)

 Author: kib
 Date: Tue Sep 24 12:24:48 2013
 New Revision: 255844
 URL: http://svnweb.freebsd.org/changeset/base/255844
 
 Log:
   Ensure that the ERESTART return from the syscall reloads the
   registers, to make the restarted syscall instruction pass the correct
   arguments.
   
   PR:	kern/182161
   Reported by:	Russ Cox <rsc at swtch.com>
   Sponsored by:	The FreeBSD Foundation
   MFC after:	3 days
   Approved by:	re (marius)
 
 Modified:
   head/sys/amd64/amd64/vm_machdep.c
 
 Modified: head/sys/amd64/amd64/vm_machdep.c
 ==============================================================================
 --- head/sys/amd64/amd64/vm_machdep.c	Tue Sep 24 11:49:04 2013	(r255843)
 +++ head/sys/amd64/amd64/vm_machdep.c	Tue Sep 24 12:24:48 2013	(r255844)
 @@ -400,9 +400,13 @@ cpu_set_syscall_retval(struct thread *td
  		 * for the next iteration.
  		 * %r10 restore is only required for freebsd/amd64 processes,
  		 * but shall be innocent for any ia32 ABI.
 +		 *
 +		 * Require full context restore to get the arguments
 +		 * in the registers reloaded at return to usermode.
  		 */
  		td->td_frame->tf_rip -= td->td_frame->tf_err;
  		td->td_frame->tf_r10 = td->td_frame->tf_rcx;
 +		set_pcb_flags(td->td_pcb, PCB_FULL_IRET);
  		break;
  
  	case EJUSTRETURN:
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-bugs mailing list