From owner-cvs-all@FreeBSD.ORG Thu Feb 10 20:14:55 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46A9116A4D0 for ; Thu, 10 Feb 2005 20:14:55 +0000 (GMT) Received: from tx6.mail.ox.ac.uk (tx6.mail.ox.ac.uk [163.1.2.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE40B43D48 for ; Thu, 10 Feb 2005 20:14:54 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from scan6.mail.ox.ac.uk ([163.1.2.179] helo=localhost) by tx6.mail.ox.ac.uk with esmtp (Exim 4.42) id 1CzKiE-00081C-K2 for cvs-all@freebsd.org; Thu, 10 Feb 2005 20:14:54 +0000 Received: from rx6.mail.ox.ac.uk ([163.1.2.170]) by localhost (scan6.mail.ox.ac.uk [163.1.2.179]) (amavisd-new, port 25) with ESMTP id 30787-02 for ; Thu, 10 Feb 2005 20:14:54 +0000 (GMT) Received: from smtp2.herald.ox.ac.uk ([163.1.0.235]) by rx6.mail.ox.ac.uk with esmtp (Exim 4.42) id 1CzKiD-00080u-LH; Thu, 10 Feb 2005 20:14:53 +0000 Received: from dhcp1041.wadham.ox.ac.uk ([163.1.161.41]) by smtp2.herald.ox.ac.uk with esmtp (Exim 3.35 #1) id 1CzKiD-0001sZ-3n; Thu, 10 Feb 2005 20:14:53 +0000 Message-ID: <420BC0BD.4030105@freebsd.org> Date: Thu, 10 Feb 2005 20:14:53 +0000 From: Colin Percival User-Agent: Mozilla Thunderbird 1.0 (X11/20050113) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Colin Percival References: <200502102009.j1AK92Nf010692@repoman.freebsd.org> In-Reply-To: <200502102009.j1AK92Nf010692@repoman.freebsd.org> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/sys read.2 write.2 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2005 20:14:55 -0000 Colin Percival wrote: > read(), pread(), write(), and pwrite() return EINVAL if they are asked > for more than INT_MAX bytes. According to POSIX, these calls have "implementation-defined behaviour" if nbytes is more than SSIZE_MAX (but should presumably operate without complaint on sizes up to that limit). The offending test is in dofilewrite() and dofileread() in sys_generic.c, but fixing this might cause problems in lower layers if there is any 64-bit unclean code lurking. I don't have enough time at the moment to check for such problems, but if someone else does, I'm sure someone somewhere would appreciate being able to read and write more than 2GB at once. :-) Colin Percival