Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2018 18:15:08 +0200
From:      Konstantin Belousov <kib@freebsd.org>
To:        Christoph Hellwig <hch@infradead.org>
Cc:        "Robert N. M. Watson" <robert.watson@cl.cam.ac.uk>, "<cl-capsicum-discuss@lists.cam.ac.uk>" <cl-capsicum-discuss@lists.cam.ac.uk>,  Mariusz Zaborski <oshogbo@freebsd.org>, Justin Cormack <justin@specialbusservice.com>, freebsd-hackers@freebsd.org
Subject:   Re: [capsicum] unlinkfd
Message-ID:  <20180305161508.GE76926@kib.kiev.ua>
In-Reply-To: <20180305155550.GA22789@infradead.org>
References:  <20180302183514.GA99279@x-wing> <CAK4o1Wyk54chHobhUkb2PBUtaWOF2rDv6tkX_bFGY6D331xUqw@mail.gmail.com> <17DE0BFF-42A2-4CD7-B09C-ABA2606C4041@cl.cam.ac.uk> <20180305155550.GA22789@infradead.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 05, 2018 at 07:55:50AM -0800, Christoph Hellwig wrote:
> With my Linux hat I'd much prefer using the AT_EMPTY_PATH flag that
> Linux already supports for a few *at calls to operate on the dirfd
> fd.  But it seems like neither FreeBSD nor anyone else picked up that
> flag, so it might be a bit of a hard sell.
> 
> FreeBSD bugzilla related to AT_EMPTY_PATH and the lack of it for
> unlinkat even in Linux:
> 
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197778
> 
> Linux bugzilla:
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=93441
> 
> If you are interested in bringing this to FreeBSD that might be reason
> enough for me into looking into a Linux implementation as well.

It is not clear from the FreeBSD PR, how unlinkat() is supposed to work.
Do you mean that unlinkat(AT_EMPTY_PATH) removes the name entry for
given fd, which was used for open(2) ? If yes, this is not possible to
implement in the current FreeBSD VFS.

Also, does linkat(AT_EMPTY_PATH) supposed to link the inode referenced
only by the file descriptor ? I believe this feature is objected to.



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