svn commit: r338989 - head/sys/amd64/amd64

Mateusz Guzik mjg at FreeBSD.org
Thu Sep 27 20:48:08 UTC 2018


Author: mjg
Date: Thu Sep 27 20:48:07 2018
New Revision: 338989
URL: https://svnweb.freebsd.org/changeset/base/338989

Log:
  amd64: fix return value of copyinstr after r338970
  
  The function stopped swapping rdi and rsi, but the error handling
  code was not updated with the new register name.
  
  Approved by:	re (implicit)
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/amd64/amd64/support.S

Modified: head/sys/amd64/amd64/support.S
==============================================================================
--- head/sys/amd64/amd64/support.S	Thu Sep 27 20:00:07 2018	(r338988)
+++ head/sys/amd64/amd64/support.S	Thu Sep 27 20:48:07 2018	(r338989)
@@ -1097,7 +1097,7 @@ copyinstr_toolong_smap:
 copyinstr_toolong:
 	/* rdx is zero - return ENAMETOOLONG or EFAULT */
 	movq	$VM_MAXUSER_ADDRESS,%rax
-	cmpq	%rax,%rsi
+	cmpq	%rax,%rdi
 	jae	cpystrflt
 	movl	$ENAMETOOLONG,%eax
 	jmp	cpystrflt_x


More information about the svn-src-all mailing list