Subject: Re: CVS commit: src/usr.sbin/installboot
To: Izumi Tsutsui <>
From: David Laight <>
List: source-changes
Date: 11/02/2003 17:04:55
On Mon, Nov 03, 2003 at 01:24:21AM +0900, Izumi Tsutsui wrote:
> In article <>
> wrote:
> > for some platforms, it *must* be RAW_PART ('c'), but for some it can
> > be on a per-partition basis.  i believe x86 is one of those.

On i386 it has to be the beginning of the BIOS boot partition.
That need not be at the start of (or even inside) the 'c' partition.

> Some platforms require to write some code in LABELSECTOR on installboot,
> but MD bounds_check_with_label() doesn't allow it unless RAW_PART
> is specified.
> (If RAW_PART is specified, bounds_check_with_label() is not called)
> On news68k, I changed bounds_check_with_label() to skip
> the check on securelevel == 0, but Christoph Badura suggested
> me to use proper ioctl() to write data in LABELSECTOR.
> I don't know what is the right solution, though.

ISTM that allowing writes to LABELSECTOR using RAW_PART is a bug!
installboot ought to be using the ioctl().

Maybe even RAW_PART shouldn't be allowed to write beyond 8k (or whatever)
in mounted filesystems, regardless of the securelevel.

However (and IIRC) some ports need to have RAW_PART because they
actually write more things than just fit into the 8k at the start
of the filesystem.


David Laight: