On Tue, 28 Sep 2004, Matthias Andree wrote: > Matthias Andree <ma_at_dt.e-technik.uni-dortmund.de> 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). BruceReceived on Tue Sep 28 2004 - 12:37:56 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:14 UTC