Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2006 15:32:59 -0500
From:      Kris Kennaway <kris@obsecurity.org>
To:        Miguel Lopes Santos Ramos <miguel@anjos.strangled.net>
Cc:        kuriyama@imgsrc.co.jp, freebsd-stable@freebsd.org, kris@obsecurity.org
Subject:   Re: rpc.lockd brokenness (2)
Message-ID:  <20060313203259.GA99538@xor.obsecurity.org>
In-Reply-To: <200603131715.k2DHFxOe044623@compaq.anjos.strangled.net>
References:  <20060310220452.GA33878@xor.obsecurity.org> <200603131715.k2DHFxOe044623@compaq.anjos.strangled.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 13, 2006 at 05:15:59PM +0000, Miguel Lopes Santos Ramos wrote:

> > I'm not yet sure whether this is a regression in 6.x or another case
> > that was broken forever.
>=20
> I didn't have problems in 5. I just compiled a 6.0-RELEASE kernel, and it
> is also broken.

I have verified (using loopback mounts and a fcntl() regression test)
that the same locking bug exists in 5.4's rpc.lockd with nfsv2, so if
you're not seeing it there then perhaps you're just lucky :(

> > Unfortunately there's currently no option to use NFSv3 for nfs root
> > mounts to work around this (unless you're using bootp), but it should
> > just be a trivial matter of adding "| NFSMNT_NFSV3" to the flags in
> > nfsclient/nfs_diskless.c:nfs_setup_diskless():
> >
> > 	nd->root_args.flags =3D (NFSMNT_WSIZE | NFSMNT_RSIZE | NFSMNT_RESVPORT=
);
>=20
> It was only today that I could try your sugestion. But... I get a kernel =
panic,
> it can't find init...
> Looking is nfsclient/bootp_subr.c, it looks like there's a little more to=
 do
> when mounting via NFSv3.

Yes, I see the same thing.  Sorry.  It would be nice to have a way to
do nfsv3 root mounts, so perhaps I'll work on this some more.

> Well, this doesn't work, but thanks to your sugestion, by looking in
> nfs_diskless.c, I found a loader option to disable lockd,
> boot.nfsroot.options=3Dlockd. This option is new (it doesn't exist on 6.0=
).
> Now I can lock any file not only on /var, but also on /etc, etc. (remember
> this option in fstab wasn't honored for the root mount)
> Everything works. Locking in shared home directories also work, because t=
hey're
> NFSv3 mounts (I tried it already...).
>=20
> So, I finally have it working, and all I needed was having this in loader=
.conf:
> boot.nfsroot.options=3Dlockd.
>=20
> I'm quite tired of this issue, so, for all I'm concerned, I'm done.

Yes, this is probably the best possible workaround.  Unfortunately,
rpc.lockd has no maintainer, so the many bugs and deficiencies in it
will probably stay unresolved for the forseeable future.

> Is the NFSv2/rpc.lockd issue reported?

Not yet, I'll file a PR when I get the time.

> Is there any information more that I can provide?

I don't think so, thanks for your help.

Kris
--6TrnltStXW4iwmi0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)

iD8DBQFEFdb7Wry0BWjoQKURAhmYAJ4k8bvDcl7ShuPGvQMW+QHCuKJevQCghEus
b3ZRzaXYF5T/Kz7E26TUwAQ=
=RHFN
-----END PGP SIGNATURE-----

--6TrnltStXW4iwmi0--



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