From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7942AC433B4 for ; Thu, 1 Apr 2021 10:43:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5602560FED for ; Thu, 1 Apr 2021 10:43:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232565AbhDAKmi (ORCPT ); Thu, 1 Apr 2021 06:42:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:48182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234122AbhDAKmS (ORCPT ); Thu, 1 Apr 2021 06:42:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7912060FEA; Thu, 1 Apr 2021 10:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617273738; bh=ivyxGcntTg0MLgIUbYonsE4bzKVNII7gy4+mFXP/MX0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wmRhrYsSkLwWL9wFaT/ay5EtNMKr+BEmGf7tHJNk365Vqlx6j36bGvQfLaW8w4tTB nwn+51a4HcfgVmAm72PRj1duigwVYKixKJn9xq+Q5xYMt8XM2pGvCS7plI7uPxg+HQ n+dpWM/sdeb3KHNR6SWTrUONBqLNnQJQxtv/pfPE= Date: Thu, 1 Apr 2021 12:42:15 +0200 From: Greg KH To: Yongji Xie Cc: devel@driverdev.osuosl.org, tkjos@android.com, Kees Cook , Suren Baghdasaryan , Jason Wang , Sargun Dhillon , Christoph Hellwig , Hridya Valsaraju , arve@android.com, viro@zeniv.linux.org.uk, joel@joelfernandes.org, linux-fsdevel@vger.kernel.org, Christian Brauner , maco@android.com Subject: Re: Re: [PATCH 2/2] binder: Use receive_fd() to receive file from another process Message-ID: References: <20210401090932.121-1-xieyongji@bytedance.com> <20210401090932.121-3-xieyongji@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Apr 01, 2021 at 06:12:51PM +0800, Yongji Xie wrote: > On Thu, Apr 1, 2021 at 5:54 PM Greg KH wrote: > > > > On Thu, Apr 01, 2021 at 05:09:32PM +0800, Xie Yongji wrote: > > > Use receive_fd() to receive file from another process instead of > > > combination of get_unused_fd_flags() and fd_install(). This simplifies > > > the logic and also makes sure we don't miss any security stuff. > > > > But no logic is simplified here, and nothing is "missed", so I do not > > understand this change at all. > > > > I noticed that we have security_binder_transfer_file() when we > transfer some fds. I'm not sure whether we need something like > security_file_receive() here? Why would you? And where is "here"? still confused, greg k-h