Subject: Re: disklabel(8) and machdep on-disk structures issues
To: Luke Mewburn <lukem@NetBSD.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 11/09/2003 21:25:01
On Mon, Nov 10, 2003 at 11:02:01AM +1100, Luke Mewburn wrote:
> 
> The argument for doing all of the "raw" label manipulation via
> DIOCWDINFO means that the port specific implementation of that
> ioctl can decide what & where it need to write.  For example, on
> the sparc, it can write the NetBSD label to the approriate part of
> the disk, and then the translated ``fake''Sun ("PROM") label as
> well.
> 
> Or are there some platforms which always fake up the incore NetBSD
> disklabel from the "native" partition map at boot, and don't actually
> have a copy of the NetBSD partition map stored on the disk?
> If so, DIOCWDINFO can just treat the raw label write as a no-op,
> and we provide [host buildable] native partition maninpulation tools
> for those platforms (a la fdisk(8) or pdisk(8)).

These two paragraphs would seem to contradict one another.  If the only
physical label format supported on a given port is the native format, it
seems to me that DIOCWDINFO should cause that native label to be written.
That's the only way to get consistent security treatment of the label
across all the ports without embedding the rules in multiple pieces of
code.

Thor