From owner-svn-src-head@freebsd.org Tue Sep 4 19:27:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC748FF970B; Tue, 4 Sep 2018 19:27:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F0D17DB04; Tue, 4 Sep 2018 19:27:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58C4B1B50B; Tue, 4 Sep 2018 19:27:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w84JRsux077817; Tue, 4 Sep 2018 19:27:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w84JRsWZ077816; Tue, 4 Sep 2018 19:27:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809041927.w84JRsWZ077816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 4 Sep 2018 19:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338460 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 19:27:54 -0000 Author: kib Date: Tue Sep 4 19:27:53 2018 New Revision: 338460 URL: https://svnweb.freebsd.org/changeset/base/338460 Log: amd64: Properly re-merge r334537 into SMAP-ified copyin(9) and copyout(9). Also this fixes the eflags.ac leak from copyin_smap() when the copied data length is multiple of eight bytes. Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Tue Sep 4 19:26:54 2018 (r338459) +++ head/sys/amd64/amd64/support.S Tue Sep 4 19:27:53 2018 (r338460) @@ -312,9 +312,10 @@ ENTRY(copyout_smap) movsq movb %dl,%cl andb $7,%cl + je 1f rep movsb - clac +1: clac done_copyout: xorl %eax,%eax @@ -361,6 +362,7 @@ ENTRY(copyin_nosmap) movsq movb %al,%cl andb $7,%cl /* copy remaining bytes */ + je done_copyin rep movsb @@ -393,10 +395,10 @@ ENTRY(copyin_smap) movsq movb %al,%cl andb $7,%cl /* copy remaining bytes */ - je done_copyin + je 1f rep movsb - clac +1: clac done_copyin: xorl %eax,%eax