From owner-freebsd-hackers@freebsd.org Mon Mar 5 15:55:54 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C04A8F3A405 for ; Mon, 5 Mar 2018 15:55:54 +0000 (UTC) (envelope-from BATV+99cf327d66dc6ede388e+5307+infradead.org+hch@bombadil.srs.infradead.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F3FD7FA46; Mon, 5 Mar 2018 15:55:53 +0000 (UTC) (envelope-from BATV+99cf327d66dc6ede388e+5307+infradead.org+hch@bombadil.srs.infradead.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rXR73tCXi5egL7SJVwb7D9y113ujI1y+sseElNxi5UA=; b=tlWiFqCWztQwaqGLtuQUhMxrH MGRzE85Kx0krt5tFLyvji48MqzuDEyx0QSvIBc0TIQ+bkH0xNbQwIbN/nJRiAGkcQTPrXwEQKtLnO s7WxgB28qJB6b0LiFYQbw6hQlmQz6eVPuF5Wuf58TdOJctqsEbbztavqxIZHvFr4jQS/LmplwGqJo A59M7oNpvqqM+YbAErlHXUHwEeWkoL71KdKr/oaP46KRa83dW+EuSKjSXElCm1WQKp2X5WAY85p8r 7TmHFiGGH21jTEA19Yb2bBFbGXQJER9XTJbKfp4jj0QpGkKRVkWmvgBMNr4PNA+Cm1ZnSmvfLKfCi S6rcbCvKg==; Received: from hch by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1essSt-0008NZ-4S; Mon, 05 Mar 2018 15:55:51 +0000 Date: Mon, 5 Mar 2018 07:55:50 -0800 From: Christoph Hellwig To: "Robert N. M. Watson" Cc: Justin Cormack , "" , freebsd-hackers@freebsd.org, Mariusz Zaborski Subject: Re: [capsicum] unlinkfd Message-ID: <20180305155550.GA22789@infradead.org> References: <20180302183514.GA99279@x-wing> <17DE0BFF-42A2-4CD7-B09C-ABA2606C4041@cl.cam.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17DE0BFF-42A2-4CD7-B09C-ABA2606C4041@cl.cam.ac.uk> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 15:55:55 -0000 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.