From owner-freebsd-hackers Tue Nov 26 04:49:44 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA02118 for hackers-outgoing; Tue, 26 Nov 1996 04:49:44 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA02112 for ; Tue, 26 Nov 1996 04:49:39 -0800 (PST) Received: from eac.iafrica.com (196-7-192-70.iafrica.com [196.7.192.70]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id EAA11997 for ; Tue, 26 Nov 1996 04:49:13 -0800 (PST) Received: (from rnordier@localhost) by eac.iafrica.com (8.7.6/8.6.12) id OAA02954; Tue, 26 Nov 1996 14:42:10 +0200 (SAT) From: Robert Nordier Message-Id: <199611261242.OAA02954@eac.iafrica.com> Subject: Re: A simple way to crash your system. In-Reply-To: <199611261205.XAA06641@godzilla.zeta.org.au> from Bruce Evans at "Nov 26, 96 11:05:10 pm" To: bde@zeta.org.au (Bruce Evans) Date: Tue, 26 Nov 1996 14:42:07 +0200 (SAT) Cc: jkh@time.cdrom.com, rnordier@iafrica.com, grog@lemis.de, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Bruce Evans wrote: > >FWIW, the table below represents a couple of months of collecting > >data from users on -questions, who reported that the msdosfs had > >seriously corrupted a UFS partition. > > > > DRIVE DOS START DOS END > > cyl head sect || cyl head sect cyl head sect size > >------------------------------------------------------------------- > >wd0 | 525 | 64 | 63 || 0 | 1 | 1 | 126 | 63 | 63 | 512001 > >wd0 | 2099 | 64 | 63 || 0 | 1 | 1 | 189 | 63 | 63 | 766017 > > same drive || 250 | 0 | 1 | 523 | 63 | 63 | 1104768 > >wd0 | 788 | 64 | 63 || 0 | 1 | 1 | 787 | 63 | 63 | 3177153 > >wd0 | 621 | 64 | 63 || 0 | 1 | 1 | 619 | 63 | 63 | 2499777 > >wd0 | 525 | 64 | 63 || 0 | 1 | 1 | 523 | 63 | 63 | 2112705 > > > >*All* problems occurred with the DOS FS on a 64/63 IDE drive. FIPS > >was not necessarily used. In one case, the corrupted UFS fs was > >actually on another drive. > > That can't be the problem, since FreeBSD ignores the geometry in both > the driver and in msdosfs. OK: just a tempting assumption based on the available data, plus the fact that I found the problem impossible to reproduce on several large heads=16, sectors/track=63 IDE drives (even for 64-sector block sizes: the maximum DOS supports). > > >Unless someone is aware of the problem being more general, it may > > MAXBSIZE = 16384. I'm not sure exactly what using larger blocks breaks, > if anything (blocks up to MAXPHYS=64K are sometimes used and work OK), > but ufs is careful to reject file systems with a larger block size. There was one (though unconfirmed) reported case of corruption involving a DOS FS with a 32-sector block size, so I suggested 8192. Either way, it might be a good thing for the current msdosfs to reject larger block sizes as well by default, possibly overrideable by a mount_msdos option or a kernel config statement. -- Robert Nordier