From owner-cvs-sys Tue Sep 16 03:36:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA16581 for cvs-sys-outgoing; Tue, 16 Sep 1997 03:36:33 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA16568; Tue, 16 Sep 1997 03:36:17 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id UAA28695; Tue, 16 Sep 1997 20:33:05 +1000 Date: Tue, 16 Sep 1997 20:33:05 +1000 From: Bruce Evans Message-Id: <199709161033.UAA28695@godzilla.zeta.org.au> To: bde@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern subr_diskslice.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >bde 1997/09/16 03:11:54 PDT > > Modified files: > sys/kern subr_diskslice.c > Log: > Reject attempts to set an in-core label which says that the "disk" > or a partition is larger than the slice. > > Now `disklabel -Brw sdX auto' should fail properly on sliced disks > without partition of type 165, e.g., on zip disks with the factory > default formatting. Previously it set a bogus in-core label for > the compatibility slice and used this to corrupt the MBR (the slice > has offset 0 and size 0, but setting the label in effect corrupted > its size to nonzero). > > `disklabel -Brw sdX auto' already failed properly on normally (not > dangerously dedicated) sliced disks _with_ partition of type 165, > because the compatibility slice has a nonzero offset so the MBR > remained inaccessible when the size was corrupted. > > This bug only affected in-core labels. On-disk labels are checked > carefully when they read and written. > > Revision Changes Path > 1.38 +10 -4 src/sys/kern/subr_diskslice.c This should go in all stable versions (after testing of course). Bruce