From owner-svn-src-all@FreeBSD.ORG Wed Nov 13 00:29:08 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8241DDA5; Wed, 13 Nov 2013 00:29:08 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 44F672427; Wed, 13 Nov 2013 00:29:07 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rAD0T6XV040104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Nov 2013 16:29:07 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rAD0T6s3040103; Tue, 12 Nov 2013 16:29:06 -0800 (PST) (envelope-from jmg) Date: Tue, 12 Nov 2013 16:29:06 -0800 From: John-Mark Gurney To: Bruce Evans Subject: Re: svn commit: r258039 - in head/sys: kern vm Message-ID: <20131113002906.GZ2279@funkthat.com> References: <201311120847.rAC8lwi8053235@svn.freebsd.org> <20131112215200.Y1480@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131112215200.Y1480@besplex.bde.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 12 Nov 2013 16:29:07 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2013 00:29:08 -0000 Bruce Evans wrote this message on Tue, Nov 12, 2013 at 22:13 +1100: > On Tue, 12 Nov 2013, Konstantin Belousov wrote: > > >Log: > > Avoid overflow for the page counts. > > > > Reported and tested by: pho > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > >Modified: head/sys/kern/vfs_vnops.c > >============================================================================== > >--- head/sys/kern/vfs_vnops.c Tue Nov 12 08:32:10 2013 (r258038) > >+++ head/sys/kern/vfs_vnops.c Tue Nov 12 08:47:58 2013 (r258039) > >@@ -933,8 +933,9 @@ vn_io_fault(struct file *fp, struct uio > > void *rl_cookie; > > struct mount *mp; > > vm_page_t *prev_td_ma; > >- int cnt, error, save, saveheld, prev_td_ma_cnt; > >+ int error, save, saveheld, prev_td_ma_cnt; > > vm_offset_t addr, end; > >+ vm_size_t cnt; > > int was correct for a count. You can't possibly have the 8TB > of physical memory needed to overflow a 32-bit int page count. ^ today > It is reasonably to assume 32-bit ints. Except that the modern AMD64 arch now allows 52 bits of address for phyiscal memory, which does mean in a few years, we will be eclipsing 8TB in a single machine... Isn't someone running FreeBSD on a 1TB machine? I'm pretty possitive I remeber someone running 512GB, so only 3/4 doublings away from hitting the limit... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."