Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 2008 18:56:12 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        kib@freebsd.org, Roman Divacky <rdivacky@freebsd.org>, rwatson@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: final decision about *at syscalls
Message-ID:  <20080416165612.GA31094@garage.freebsd.pl>
In-Reply-To: <200804161014.41025.jhb@freebsd.org>
References:  <20071218092222.GA9695@freebsd.org> <200712201138.56423.jhb@freebsd.org> <20080412112019.GI45299@garage.freebsd.pl> <200804161014.41025.jhb@freebsd.org>

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

--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Apr 16, 2008 at 10:14:40AM -0400, John Baldwin wrote:
> On Saturday 12 April 2008 07:20:19 am Pawel Jakub Dawidek wrote:
> > From what you write John, #1 is a better choice than #2. If you want to
> > avoid races, you can pass already locked vnode. In case of file
> > descriptors, if p_fd is not locked another thread can close and open
> > different directory under the same descriptor number.
>=20
> Did you read Robert's paper?  Do you not realize that the kernel copying =
data=20
> in from userland multiple times and having it change in between is very b=
ug=20
> prone?

Believe me I'm fully aware of the problems Robert described in his
paper. With vnode approach where do you have more data copying between
kernel and userland?

File descriptor proposal works like this:

userland
	openat(fd, path)
kernel
	NDINIT_AT(&vp, path, fd);
	/* operate on vp */

Vnode proposal works this way:

userland
	openat(fd, path)
kernel
	dvp =3D file_descriptor_to_vnode(fd);
	NDINIT_AT(&vp, path, dvp);
	/* operate on vp */

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--XsQoSWH+UP9D9v3l
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFIBi+rForvXbEpPzQRAuQzAKCiBCGMz+eYtUMUlxOHAZ/h24jFsgCfXTso
hh0WOhUPunmiEGxhJ/Do/Vs=
=iqfy
-----END PGP SIGNATURE-----

--XsQoSWH+UP9D9v3l--



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