Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4431424imm; Mon, 30 Jul 2018 14:44:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdeBcN/g5BOEWPJ0EORuyC5ugjVQt481tVgrCwYfWuz9fESLwNQxwPS9wSBTHYhJoTZ80Jx X-Received: by 2002:a63:9311:: with SMTP id b17-v6mr17900680pge.261.1532987063337; Mon, 30 Jul 2018 14:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532987063; cv=none; d=google.com; s=arc-20160816; b=IK6z/jDa7ZKM6uFa9v1s80r2zbrtt7SU0oPNx9wUw7tfVsQAjsIeje+f/uqFODOq0Y ij6AsXH5vtMlDZJ5Z9I6fYf6jE7h/ruWmwagsBKBfSzZP7UVJ/h9BNAqn0TQQTwUVlTH N5aqj+1SP61UIZ3PTwz2qvHaZHdkmWi+XguVXof16T2PFQk+O2lPTJ4g+E6rR2CD5S5v ndGQiVsfIojnjj11eXQg6xmvhFN4lFDzBiflYOp4HX58EUVI3ZnPYRQpw+tL1Ohwgo2N aLtB7rfzlh1yLRrCIpqicy3tatx+h5ZVguGZV//fwe5mvRzJPcQKBjdRmWXNBYw2rJbp 1p6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=yMJEZQzwhnQGNwBLVTuq5mnoMDG7Wh/XAtBX+xfm0LA=; b=R1H22DaSktpliAPbW7g15xR4guF6yvEbGeT1lrmHvZ4oIO34ND65Gjas70eB+DJReB I8vs9Tk/CyVKecd8hWcApPtkvpN6Bd2vU4hx3k+hsMaDyZDS0atCv0cvPO+lXN6lw/v9 mGddAt78izmSByzeunFi2++TJFlO8QewYbeb9g25Sz3fBWtm49+EdCmg++RrC3S61FTE 0WCgiVd9Y2ZyeKKizvjhhZSqw4Y4247BpZ2gm+R37u4okImJwWbStWqObR/EoFwgaF3k cRfQRumsfRU8uaFXlijK53smUe8hC0gHSO6/SSEyYFfqiPmIiIY5+jDx8P6oZpjVbcYv pnmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 74-v6si5245465pfz.72.2018.07.30.14.44.08; Mon, 30 Jul 2018 14:44:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731699AbeG3XUL (ORCPT + 99 others); Mon, 30 Jul 2018 19:20:11 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:54304 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729378AbeG3XUL (ORCPT ); Mon, 30 Jul 2018 19:20:11 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fkFwf-0007ko-Fw; Mon, 30 Jul 2018 21:43:13 +0000 Date: Mon, 30 Jul 2018 22:43:13 +0100 From: Al Viro To: Matthew Wilcox Cc: Christoph Hellwig , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, arve@android.com, tkjos@android.com, maco@android.com, rlove@google.com, ben@decadent.org.uk Subject: Re: [PATCH 1/4] file: export __alloc_fd() Message-ID: <20180730214313.GF30522@ZenIV.linux.org.uk> References: <20180730143710.14413-1-christian@brauner.io> <20180730143710.14413-2-christian@brauner.io> <20180730163155.GA27761@infradead.org> <20180730203633.GC12962@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180730203633.GC12962@bombadil.infradead.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 30, 2018 at 01:36:33PM -0700, Matthew Wilcox wrote: > On Mon, Jul 30, 2018 at 09:31:55AM -0700, Christoph Hellwig wrote: > > On Mon, Jul 30, 2018 at 04:37:07PM +0200, Christian Brauner wrote: > > > The Android binder driver will be turned into a module. Since it uses > > > __alloc_fd() we need to export this function. > > > > Err, hell no. > > > > It should be using an anon fd probably. > > I'm not entirely sure I understand the binder code (... does anyone?) > but from what I can see, it intends to open a file descriptor in the > process which is the target of the message being sent. That strikes > me as wrong-headed; it should be allocating a struct file and passing > that file to the other process. When that process receives the message, > *it* allocates a file descriptor for itself. > > But I think the binder user-space API relies on this. The userspace API > seems to rely on passing fd numbers around ... but I'm having trouble > figuring most of this user API out. Perhaps Martijn can help here. ... and there's a perfectly sane solution to that - it's called git rm.