Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Feb 2007 15:29:59 -0800
From:      Nate Lawson <nate@root.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, Poul-Henning Kamp <phk@phk.freebsd.dk>, Marcel Moolenaar <marcel@FreeBSD.org>, cvs-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/amd64/conf GENERIC src/sys/arm/conf EP80219 src/sys/conf NOTES files files.powerpc options src/sys/geom geom_apple.c geom_gpt.c src/sys/geom/part g_part.c g_part.h g_part_apm.c g_part_gpt.c g_part_if.m src/sys/i386/conf GENERIC ...
Message-ID:  <45CA60F7.4000507@root.org>
In-Reply-To: <20070207225651.T23167@fledge.watson.org>
References:  <2107.1170888121@critter.freebsd.dk> <20070207225651.T23167@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote:
> 
> On Wed, 7 Feb 2007, Poul-Henning Kamp wrote:
> 
>> In message <20070207200130.J23167@fledge.watson.org>, Robert Watson 
>> writes:
>>
>>>>  The ctlreq interface supports verbs to create and destroy
>>>>  partitioning schemes on a disk; to add, delete and modify
>>>>  partitions; and to commit or undo changes made.
>>>
>>> Does this mean we can expect to see the disabling of GEOM 
>>> exclusive-use protections disappear from normal administrative 
>>> activities soon, as there will now be approved channels to 
>>> incrementally change the layout of in-use partition tables?
>>
>> There is already a mechanism for that.  How do you think bsdlabel(8) 
>> and fdisk(8) works ?
> 
> I understand that.  This was a pragmatic question rather than a 
> philosophical question: I know it can be done, but is it now being 
> done.  The answer appears to be yes.

I assume phk@ is referring to the geom debug flags sysctl.  The problem 
with that approach is that it disabled (and potentially left disabled if 
the flag wasn't cleared as the tool exits) all protection for the 
devnode behind the mounted drive.  If something else was running at the 
same time, it could overwrite any data on the devnode.  Or the fdisk 
tool could write anywhere in the device, not just the boot sector.

I really like Marcel's change since it puts control of the actions to 
make changes into the GEOM, allowing for finer-grained validation of 
user tool actions.  And undo would be just amazing.  Thanks!

-- 
Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45CA60F7.4000507>