From owner-svn-src-stable-11@freebsd.org Thu Jun 15 18:49:48 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BAC5B940CE; Thu, 15 Jun 2017 18:49:48 +0000 (UTC) (envelope-from alc@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 mx1.freebsd.org (Postfix) with ESMTPS id E06847FCA5; Thu, 15 Jun 2017 18:49:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5FInlTs012596; Thu, 15 Jun 2017 18:49:47 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5FInlmu012595; Thu, 15 Jun 2017 18:49:47 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201706151849.v5FInlmu012595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 15 Jun 2017 18:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319985 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2017 18:49:48 -0000 Author: alc Date: Thu Jun 15 18:49:46 2017 New Revision: 319985 URL: https://svnweb.freebsd.org/changeset/base/319985 Log: MFC r319540 The data type returned by vmoff() is too narrow in its range. This could break the transmission of files longer than 4 GB on 32-bit architectures. Approved by: re (gjb) Modified: stable/11/sys/kern/kern_sendfile.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sendfile.c ============================================================================== --- stable/11/sys/kern/kern_sendfile.c Thu Jun 15 17:46:20 2017 (r319984) +++ stable/11/sys/kern/kern_sendfile.c Thu Jun 15 18:49:46 2017 (r319985) @@ -207,12 +207,12 @@ xfsize(int i, int n, off_t off, off_t len) /* * Helper function to get offset within object for i page. */ -static inline vm_offset_t +static inline vm_ooffset_t vmoff(int i, off_t off) { if (i == 0) - return ((vm_offset_t)off); + return ((vm_ooffset_t)off); return (trunc_page(off + i * PAGE_SIZE)); }