From owner-freebsd-standards@FreeBSD.ORG Tue Sep 28 14:37:56 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B5F016A4CE; Tue, 28 Sep 2004 14:37:56 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9417F43D46; Tue, 28 Sep 2004 14:37:55 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i8SEbjfA019784; Wed, 29 Sep 2004 00:37:45 +1000 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) i8SEbhWS025932; Wed, 29 Sep 2004 00:37:44 +1000 Date: Wed, 29 Sep 2004 00:37:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Matthias Andree In-Reply-To: Message-ID: <20040929002825.M60452@delplex.bde.org> References: <415720FD.8080603@samsco.org> <415812AD.2090901@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Scott Long cc: standards@FreeBSD.org cc: re@FreeBSD.org cc: current@FreeBSD.org Subject: Re: FreeBSD 5.3-BETA6 available X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2004 14:37:56 -0000 On Tue, 28 Sep 2004, Matthias Andree wrote: > Matthias Andree writes: > > >>> 3. data corruption on unaligned block access bug, kern/60313, > >>> is still open and unpatched AFAICS > >> > >> Is this actually an issue in FreeBSD 5? In the audit trail of the PR, > >> Bruce Evans seems to concede that GEOM checks block alignment > >> properly. > > OK, seeking to a position that is not a multiple of the block size > appears to trigger EINVAL on a subsequent write so this is > NOT an issue for FreeBSD 5. Except EINVAL is an undocumented and unreasonable errno for write(2). (It is documented and reasonable for pwrite(2) because it is for pwrite()'s offset arg, but even for pwrite(), misaligned offsets are not invalid: as specified in POSIX.1 but not in pwrite(4), only negative args are invalid for pwrite().) The correct errno seems to be EIO (because the device is physically incapable of doing misaligned i/o). Bruce