Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4123687pxb; Tue, 2 Nov 2021 04:39:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnoQHGyz0xEP+vKILzMo8pmWl/UUNamM8dH97f7dp3QHVi39ScE7p423Jwt02Ce3ihHViG X-Received: by 2002:a17:907:995a:: with SMTP id kl26mr44788475ejc.413.1635853146298; Tue, 02 Nov 2021 04:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635853146; cv=none; d=google.com; s=arc-20160816; b=TULZGdX/9leQtgucinkpD1ipE3C0DD4rNpw4Vs28zheXxUDDEhY5LzJ3/cDcsjtSMU tAXTRtVd82cirRWKTJcl7Wi2I7TmK9DuQfT+qZ0+suByVWvNiTy22braOclEnuUb8jqr IhnwpFouyWhPsMY/K4sN6ugU0qyZuFwdjRn1+S0mKUQaNYmhlEJV00+3f7SX3MJ6pP4F /ajcAE1tJ43ISwUbz3CpsK2KV+JEYFGoWmmFerRkQhtdyu6vASjHEv4qPg19ngxq1YlA m57Wap07OPIiduCA+jCpURLG+vwgqHqOe5nnd+hppHzh4Gl8YsrbkZElh9DvA6pYmNaN /u0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=sLoLr2rTSbsc6ka42iOAiOU4K7xmfqZ7HgNsGiuZWtk=; b=dYtwNVGmwtpBZF72kZTtsHUm5E0xH5J2WFeaBw5hi2WzG0wzzfUk/2ex8icubX+cnn 56203OszEZV0LvZKriZ3IaywK/oYqPXbRFrsaejnq9pq6U3BwnhyQeYYqVvYVbOBm2O7 miD0SLeRGGPV8xYpgOWhDl0qmkEK4M244qxAzaKbCQUC6XPxgcc6V+9HXwoP5bqfX9fi 78awTa/oeRl1JR+JjAdodo+skWE7rVduqRY4i+7DZjr1KJEjtLc9PK0a50DZRsGBJSeb VE3W4RnPkfZlYr/98qSBjZntXxR1v2PdEyKxzjISS6FDH+jMViuXzZnQ5E0ZyQxeIAmz V6UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qw30si13020773ejc.464.2021.11.02.04.38.42; Tue, 02 Nov 2021 04:39:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231145AbhKBLjU (ORCPT + 99 others); Tue, 2 Nov 2021 07:39:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:49180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231219AbhKBLjT (ORCPT ); Tue, 2 Nov 2021 07:39:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9EEA460E0C; Tue, 2 Nov 2021 11:36:41 +0000 (UTC) Date: Tue, 2 Nov 2021 12:36:37 +0100 From: Christian Brauner To: Daniel Borkmann , Miklos Szeredi Cc: Lorenz Bauer , Al Viro , Alexei Starovoitov , Andrii Nakryiko , Miklos Szeredi , Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, network dev , bpf , Christian Brauner Subject: Re: [PATCH bpf-next v3 2/4] libfs: support RENAME_EXCHANGE in simple_rename() Message-ID: <20211102113637.qfystxmvzmr6yqhq@wittgenstein> References: <20211028094724.59043-1-lmb@cloudflare.com> <20211028094724.59043-3-lmb@cloudflare.com> <7988de27-1718-60c1-ec03-9343d2cc460f@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7988de27-1718-60c1-ec03-9343d2cc460f@iogearbox.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 02, 2021 at 11:11:02AM +0100, Daniel Borkmann wrote: > On 11/2/21 10:25 AM, Miklos Szeredi wrote: > > On Thu, 28 Oct 2021 at 11:48, Lorenz Bauer wrote: > > > > > > Allow atomic exchange via RENAME_EXCHANGE when using simple_rename. > > > This affects binderfs, ramfs, hubetlbfs and bpffs. > > > > Ramfs and hugetlbfs are generic enough; those seem safe. > > > > Binderfs: I have no idea what this does; binderfs_rename() should Fwiw, allows dynamic creation and removal of Android binder ipc devices. Each mount is a separate instance and it's mountable inside unprivileged containers. Since Android 12 default how binder devices are managed. Also makes it possibe to run Android in unprivileged containers. > > probably error out on RENAME_EXCHANGE for now, or an explicit ack from > > the maintainers. > > Thanks for the review, Miklos! Adding Christian to Cc wrt binderfs ... full context > for all patches: https://lore.kernel.org/bpf/20211028094724.59043-1-lmb@cloudflare.com/ Yep, I saw that. Seems good. > probably error out on RENAME_EXCHANGE for now, or an explicit ack from > the maintainers. I don't think there is any issue in allowing binderfs to support this. Binderfs files are always device nodes. Allowing them to be atomically renamed shouldn't be a problem. So: Acked-by: Christian Brauner Christian