From owner-freebsd-arch@FreeBSD.ORG Thu Apr 17 14:24:44 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6B67106564A; Thu, 17 Apr 2008 14:24:44 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206046210.chello.pl [87.206.46.210]) by mx1.freebsd.org (Postfix) with ESMTP id F41C38FC17; Thu, 17 Apr 2008 14:24:43 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6F4FA45CA6; Thu, 17 Apr 2008 16:24:41 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id B17494569A; Thu, 17 Apr 2008 16:24:36 +0200 (CEST) Date: Thu, 17 Apr 2008 16:24:18 +0200 From: Pawel Jakub Dawidek To: John Baldwin Message-ID: <20080417142418.GA35655@garage.freebsd.pl> References: <20071218092222.GA9695@freebsd.org> <200804161014.41025.jhb@freebsd.org> <20080416165612.GA31094@garage.freebsd.pl> <200804170933.45477.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: <200804170933.45477.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: kib@freebsd.org, Roman Divacky , rwatson@freebsd.org, freebsd-arch@freebsd.org Subject: Re: final decision about *at syscalls X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2008 14:24:44 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 17, 2008 at 09:33:45AM -0400, John Baldwin wrote: > On Wednesday 16 April 2008 12:56:12 pm Pawel Jakub Dawidek wrote: > > 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 wan= t 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. > > > > > > Did you read Robert's paper? Do you not realize that the kernel copy= ing > > > data in from userland multiple times and having it change in between = is > > > very bug 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? >=20 > Only because it was explicitly mentioned in the original e-mail: >=20 > > CONs of #1 > >=20 > > o some very small code duplication (the translation is do= ne in every=20 > > kern_fooat() function) > > o there is a race between the name translation and the ac= tual use of the result > > of the translation that needs to be handled, the "path_= to_file" string is copied > > to the kernel space twice hence a race Ah, ok. I don't think this is not method's flaw, but implementation problem. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFIB12RForvXbEpPzQRAqinAJ46IU96CpA9sdGmUJ/qSn0VrLx1xwCfQsHm adoLOLOzTE6q09mnHyxQRIU= =v9UV -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc--