From owner-cvs-all@FreeBSD.ORG Tue Jan 25 10:58:13 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 54F4416A4CE; Tue, 25 Jan 2005 10:58:13 +0000 (GMT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F0CD43D39; Tue, 25 Jan 2005 10:58:12 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.1/8.13.1) with ESMTP id j0PAwB0D030454; Tue, 25 Jan 2005 13:58:11 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.1/8.13.1/Submit) id j0PAwB2W030453; Tue, 25 Jan 2005 13:58:11 +0300 (MSK) (envelope-from ache) Date: Tue, 25 Jan 2005 13:58:11 +0300 From: Andrey Chernov To: Poul-Henning Kamp Message-ID: <20050125105811.GA29791@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Poul-Henning Kamp , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <20050125103250.GA29461@nagual.pp.ru> <80962.1106649452@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80962.1106649452@critter.freebsd.dk> User-Agent: Mutt/1.5.6i X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.29.0.8; VDF: 6.29.0.77; host: nagual.pp.ru) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (nagual.pp.ru [0.0.0.0]); Tue, 25 Jan 2005 13:58:11 +0300 (MSK) cc: cvs-src@FreeBSD.ORG cc: src-committers@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern sys_generic.c 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: Tue, 25 Jan 2005 10:58:13 -0000 On Tue, Jan 25, 2005 at 11:37:32AM +0100, Poul-Henning Kamp wrote: > In message <20050125103250.GA29461@nagual.pp.ru>, Andrey Chernov writes: > >On Tue, Jan 25, 2005 at 11:26:32AM +0100, Poul-Henning Kamp wrote: > >> Show me code which breaks please. > > > >It is not an argument. Your commit violates both POSIX and SUSv3, namely > >this thing: > > > >"This volume of IEEE Std 1003.1-2001 requires that no action be taken for > >read() or write() when nbyte is zero. This is not intended to take > >precedence over detection of errors (such as invalid buffer pointers or > >file descriptors). This is consistent with the rest of this volume of IEEE > >Std 1003.1-2001, but the phrasing here could be misread to require > >detection of the zero case before any other errors." > > Notice the "require" it doesn't ban the practice. > > Go look at fifofs: we never did that (please see also rev. 1.104 Well, lets don't touch whole fifo subject for a while (maybe it needs to be fixed or maybe not) to allow more focusing on our subject. I can't discuss all directions at once. What's about "invalid buffer pointers" detection, directly mentioned in the standard (above)? Now it is broken for zero bytes read because your newly inserted check takes precedence. -- http://ache.pp.ru/