From owner-freebsd-scsi Sat Oct 18 10:51:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA27255 for freebsd-scsi-outgoing; Sat, 18 Oct 1997 10:51:14 -0700 (PDT) (envelope-from owner-freebsd-scsi) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id KAA27250 for ; Sat, 18 Oct 1997 10:51:10 -0700 (PDT) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id TAA12353 for freebsd-scsi@FreeBSD.ORG; Sat, 18 Oct 1997 19:51:01 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id TAA00466; Sat, 18 Oct 1997 19:32:10 +0200 (MET DST) Message-ID: <19971018193207.SI11932@uriah.heep.sax.de> Date: Sat, 18 Oct 1997 19:32:07 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-scsi@FreeBSD.ORG Subject: Re: Cannot happen? References: <199710181438.AAA28420@godzilla.zeta.org.au> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199710181438.AAA28420@godzilla.zeta.org.au>; from Bruce Evans on Oct 19, 1997 00:38:58 +1000 Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Bruce Evans wrote: > >But the questions is: how can this happen? > > 1. a slice table or label can override the driver's idea of the disk size. > This is a feature. (Not the case.) > 2. the frobbing of the sector size in the current sd and od is still broken. > It allows writing beyond the disk. This shouldn't happen for paging. This seems to be the problem. > 3. some drivers don't do any bounds checking for the raw partition. This > is not a problem for sd and the raw partition shouldn't be used for > paging. It wasn't happening together with paging. The last block of this disk was assigned to my /home filesystem. I think the error message from the pager was due to the IO being done through mmap() (or due to the similar effect of the merged VM/buffer cache). > >Ain't the driver supposed > >to limit the requests before calling the SCSI layers? Ain't the > > Sort of. SCSI drivers can probably rely on the device to do the checking. But well, they should return a short read instead of blasting the console with error messages, and even worse, delivering a signal to the application. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)