Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Aug 2011 11:00:59 +0400
From:      Test Rat <ttsestt@gmail.com>
To:        freebsd-fs@freebsd.org
Subject:   Re: kern.geom.debugflags=16 does NOT allow me to write to device
Message-ID:  <867h6pemdw.fsf@gmail.com>
References:  <y2z5a1151761004221355l391c05f4qc6c0f760321b56f5@mail.gmail.com> <g2rb269bc571004221414m828ac15ahdde1abaf43b6ee8c@mail.gmail.com> <h2w5a1151761004221429y43d71d7ga13febd1c518c0d1@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Schuller <peter.schuller@infidyne.com> writes:

[...]
> In addition, geom(4) still has:
>
>      0x10 (allow foot shooting)
>              Allow writing to Rank 1 providers.  This would, for example,
>              allow the super=E2=80=90user to overwrite the MBR on the roo=
t disk or
>              write random sectors elsewhere to a mounted disk.  The impli=
ca=E2=80=90
>              tions are obvious.
>
> In addition, geom/geom_subr.c has:
>
> 	/* If foot-shooting is enabled, any open on rank#1 is OK */
> 	if ((g_debugflags & 16) && pp->geom->rank =3D=3D 1)
>                       ;
>
> I wonder if the problem is that it's not of rank 1 because I'm writing
> to the slice's first second rather than the MBR... That's now feeling
> pretty likely and can perhaps explain lots of confusion that seems to
> exist based on Googling.
[...]

The issue still seems unanswered. For example, this guide

  http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition

silently avoids explaining why zroot on MBR & BSD should be exported.

If gpart is ever fixed I still think shooting the foot on rank > 1 is
useful for things like testing FS for corruption without accidentally
destroying partition table if operating on rank =3D=3D 1.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?867h6pemdw.fsf>