Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Sep 2018 20:48:07 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338989 - head/sys/amd64/amd64
Message-ID:  <201809272048.w8RKm7wO041717@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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