From owner-freebsd-bugs Mon Jun 25 6:40: 5 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6093B37B401 for ; Mon, 25 Jun 2001 06:40:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5PDe3770795; Mon, 25 Jun 2001 06:40:03 -0700 (PDT) (envelope-from gnats) Date: Mon, 25 Jun 2001 06:40:03 -0700 (PDT) Message-Id: <200106251340.f5PDe3770795@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: kern/28164: [PATCH] crashdump can trash disklabel/other partitions Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/28164; it has been noted by GNATS. From: Bruce Evans To: Phil Homewood Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/28164: [PATCH] crashdump can trash disklabel/other partitions Date: Mon, 25 Jun 2001 23:31:11 +1000 (EST) On Mon, 25 Jun 2001, Phil Homewood wrote: > Bruce Evans wrote: > > I think you are just trashing the label becauses it is inside da1s2b, not > > overrunning da1s2b. > > That was a conclusion I was starting to draw, too. BTW, I jumped to the conclusion that it was overrunning the partition for you because of another report that claimed overrunning. > > This is certainly a bug. The label is write protected > > in software, but the dump routines don't even know that the label is there. > > Should it be there? Yes, they should know, since they bypass the normal block number conversion and bounds checking and need to understand the label (contents, not where it is) to do so. > > This bug is not seen in most configurations because the dump partition > > usually starts at a nonzero offset. > > Is this configuration acceptable ('b' is a swap partition) or should > it start at non-zero offset? Alas, I can't remember if it was > /stand/sysinstall or /dev/luser who put it there like that. It is acceptable to me (I like corner cases to work prefectly :-), but is risky because it is unusual. The same bug used to affect swapping, but it bit enough to get it worked around a long time ago. The swap code just avoids using the first 128K or so. It really should understand labels too (the label might be at a strange place, after 128K ...), or better, a common routine should understand all the metadata at the start of the device. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message