Date: Mon, 25 Jun 2001 06:40:03 -0700 (PDT) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/28164: [PATCH] crashdump can trash disklabel/other partitions Message-ID: <200106251340.f5PDe3770795@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/28164; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: Phil Homewood <pdh@lineo.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106251340.f5PDe3770795>