Subject: Re: Patch to disallow mounts of unclean FFS unless forced
To: Greywolf <greywolf@starwolf.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 10/20/2003 10:13:22
--aT9PWwzfKXlsBJM1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 14, 2003 at 09:00:43AM -0700, Greywolf wrote:
> Thus spake Charles M. Hannum ("CMH> ") sometime Today...
>=20
> CMH> On Monday 13 October 2003 06:09 pm, Jason Thorpe wrote:
> CMH> > The following patch changes the FFS code to disallow mounts of unc=
lean
> CMH> > file systems unless the mount is forced.  Mounts can be forced by =
root
> CMH> > using the -f flag to mount(8).  Non-root users are not allowed to =
force
> CMH> > mounts (this is enforced by sys_mount()).  The initial mount of the
> CMH> > root file system is always forced.
> CMH>
> CMH> So, exactly what problem are you attempting to solve here?  This is =
one of the
> CMH> most irritating misfeatures of FreeBSD.
>=20
> Not to seem to "jump on a bandwagon", but I have similar concerns (forget
> that I'm not as technically advanced as Prof. Hannum).
>=20
> If we're disallowing all mounts, including read-only, we must be doing
> this for a reason, i.e., some read must cause a panic or other inconsiste=
nt
> internal state.

Note: we aren't disallowing, we are requiring the '-f' flag be present. So=
=20
if you are sitting down at the box, you just re-try the mount command with=
=20
-f, and there you go.

We're doing this so that dirty file systems don't get blindly mounted. And=
=20
admin can do it, but s/he has to take that explicit step.

As the admin can easily cause the file system to be mounted, I see no=20
reason to make a distinction between ro and rw mounts. They pose the same=
=20
threat to kernel stability.

Take care,

Bill

--aT9PWwzfKXlsBJM1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/lBeyWz+3JHUci9cRAhalAJ0eiXArMjzxAmadf79oci6rsyAHaACfRks7
fEtpv80aTmWYO0fBwFk9LIo=
=AIOX
-----END PGP SIGNATURE-----

--aT9PWwzfKXlsBJM1--