Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2008 09:33:45 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Pawel Jakub Dawidek <pjd@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:  <200804170933.45477.jhb@freebsd.org>
In-Reply-To: <20080416165612.GA31094@garage.freebsd.pl>
References:  <20071218092222.GA9695@freebsd.org> <200804161014.41025.jhb@freebsd.org> <20080416165612.GA31094@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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 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.
> >
> > Did you read Robert's paper?  Do you not realize that the kernel copying
> > 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?

Only because it was explicitly mentioned in the original e-mail:

> CONs of #1
> 
>         o       some very small code duplication (the translation is done in every 
>                 kern_fooat() function)
>         o       there is a race between the name translation and the actual 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

-- 
John Baldwin



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