Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp584481imw; Fri, 8 Jul 2022 08:09:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8V8hVZ13DKUyPMDmyNzsm/ZI2FGFdeEigsj95sWEfWA/Lopu9hG6gdfmoyuofimjZ0tOL X-Received: by 2002:a05:6a00:114c:b0:528:2c7a:6302 with SMTP id b12-20020a056a00114c00b005282c7a6302mr4208408pfm.37.1657292943452; Fri, 08 Jul 2022 08:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657292943; cv=none; d=google.com; s=arc-20160816; b=lCcS0rd3Q5SSSzaJzbTO6r29mu2Xy/EoanA6tGibATLKVbBwUR+o691ivL6Q84lAPp tXC1iR5pwh48Qob0RLrvd+tPO0gLAjirl8W+CRHoaoWmVrUFhvWAJJ3AGU6DrC91mgB/ fhKc+ghJJrOapeChdO70bLsk8nrGygKiso4d83V/XF0Ds7Uha7kkVt5CvJNI1/cicbj6 CSes/4qXhr5i90J1kXXAQre43tQQsm9z8Bz8ttBMoVxJ52RvOAd2imKXR5p9khGql4RT Sp9OlUr82ne/K57GKL+/3OziOW3cH1QJSuPbStG34kBTVLmC6GcJi0bZDBHzx2YKT0Y1 rNww== 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:dkim-signature; bh=lJuDGYGVACdH1f491h6pX5w1REmhIPP41yS6lr1Dp7E=; b=kTVWu2k/H1y4Oz09c6GLxKslrPlA/yI9vi4cf0wfzaQzyVUwU0gBLt+SZ+3q+7ARwb aBEyU42BM5LoViRgNYWVNnznbF8umEReJW6WrYQSBeTxA1LAHvTuxr+faAP2bGh/EhO6 tZCOAIK//88wQJUGiD/mMGLOQn7SgjPXpJ0zRTTNY5FHvZo5uItLsVY6pKstidJ6Pjwr 634l+HGafvQBfCQqfyOFRrihan7IecscQhKgyQNk1j5ERH/gLC/Qf62eMhGYvVV6eBN5 qvvPmmpx7lSvoeXiuNuldPP161ywx5xlSufMt2q7oIr7NPtNS2f2pRHD0K49poqOB255 vTDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=l7X9JK7p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h190-20020a6383c7000000b0041292ba0f7asi10920402pge.168.2022.07.08.08.08.49; Fri, 08 Jul 2022 08:09:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=l7X9JK7p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238195AbiGHOaj (ORCPT + 99 others); Fri, 8 Jul 2022 10:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238180AbiGHOah (ORCPT ); Fri, 8 Jul 2022 10:30:37 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83C5D1BE8F for ; Fri, 8 Jul 2022 07:30:36 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id q5so864831plr.11 for ; Fri, 08 Jul 2022 07:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=lJuDGYGVACdH1f491h6pX5w1REmhIPP41yS6lr1Dp7E=; b=l7X9JK7pb1SCB1VOwd0BFNdN2+8Oxck1nFSjIEVc1+lkUufAju0LF+XjooUgXVbd1C VSSDHigp5/aBusEWPbDmUjrjN0XNPUG73cnykVNcCfta8mUu08VzfbGidJXFwFrOAbwe 1xo+PuSM+BN1B6uhhoxdbdts6WV+IKzd4rc4r/ODTvZ0Jnxz54yv3u8Mmg4wH0uHNkIu cHvEQQI28V5Jc0cynpsm84n8iEy+7Zm3hwFonzuT0mcS90JfSgTygeMPoEAfxufQ3OCR 3m3owWlt+k2c3SNp1lxQeAOYr1+UMmh36AKSIB9BgZQEpe0CI3eYoxCI+09faNPjSrL7 nEeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lJuDGYGVACdH1f491h6pX5w1REmhIPP41yS6lr1Dp7E=; b=m4xbAWQnc3kak8gyUL2VR6Tk5jAyEksnVcBYSTZFKn6qY2Bbnz2NgVkCpW3RQcThID x3vhp3vAuxozA3SoWzhhelm572H6QUR8dxVNT6kS6fjuyPvwjrGpbeZe1498a6CTws5A XfLaDbAo0ssW2WmL4kuxo57n7RAJ0Xby1FgFy4WUQ31mnNtHb18UGwS0PqxMUskO4BD/ 91acPmJ2ev4NoJzc8AHBymEiMMoiic5M+VkImSnE8ffZsBEsKjqjweOQipgs11meRkmx kzSsGpOy9qAEiPK3T70XO07sEKX9ynV/goCCUO6GVLtMaJPh1cJHEXRZR0KIZE+RtW/X V9nA== X-Gm-Message-State: AJIora+F8Nya0/YRvnSAmRgv50dV9XQ+z/l35pLWwEDG5aLUUw8hKhBz O+Hemi+G4HtJ80ZiHufOXPlVZg== X-Received: by 2002:a17:902:ce8d:b0:16c:2755:4289 with SMTP id f13-20020a170902ce8d00b0016c27554289mr2214433plg.82.1657290635696; Fri, 08 Jul 2022 07:30:35 -0700 (PDT) Received: from google.com (201.59.83.34.bc.googleusercontent.com. [34.83.59.201]) by smtp.gmail.com with ESMTPSA id y144-20020a626496000000b0052aaf7fe731sm1746830pfb.45.2022.07.08.07.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 07:30:35 -0700 (PDT) Date: Fri, 8 Jul 2022 14:30:31 +0000 From: Carlos Llamas To: Greg Kroah-Hartman Cc: Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Christian Brauner , Joel Fernandes , Hridya Valsaraju , Suren Baghdasaryan , kernel-team@android.com, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH] binder: fix redefinition of seq_file attributes Message-ID: References: <20220701182041.2134313-1-cmllamas@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 08, 2022 at 08:00:50AM +0200, Greg Kroah-Hartman wrote: > On Thu, Jul 07, 2022 at 09:21:52PM +0000, Carlos Llamas wrote: > > On Mon, Jul 04, 2022 at 06:13:40PM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Jul 01, 2022 at 06:20:41PM +0000, Carlos Llamas wrote: > > > > + binder_for_each_debugfs_entry(db_entry) { > > > > + dentry = binderfs_create_file(binder_logs_root_dir, > > > > + db_entry->name, > > > > + db_entry->fops, > > > > + db_entry->data); > > > > + if (IS_ERR(dentry)) { > > > > + ret = PTR_ERR(dentry); > > > > + goto out; > > > > + } > > > > > > I know this is a copy of what is there already, but there is never a > > > need to check the result of a debugfs_create_* call. Just call it and > > > move on, never "abort" based on the result of a debugfs call, that's not > > > a good idea. > > > > This is true, none of these debugfs files seem critical for mounting a > > binderfs instance. I'm thinking init_binder_logs() should just return > > void. I'm only a bit hesitant to completely ignore the return code as > > users specifically ask for these files to be created via mount option > > "stats". So probably a pr_warn is what is actually needed here. > > That would just be too noisy, just let it go, no one cares :) ok, convinced. I'll get rid of these checks. > > > > So can you change this here, or want to send a follow-on patch that > > > removes these checks? > > > > Sure, I'll send a follow-on patch. I'm currently AFK so setting ETA for > > next week until I can actually test this change. > > > > > > > > > } > > > > > > > > proc_log_dir = binderfs_create_dir(binder_logs_root_dir, "proc"); > > > > > > Also there's never a need to save a directory, you can always look it up > > > when you want to remove it. > > > > It seems this is a convenient way to share this path with binder which > > otherwise doesn't know where binderfs was mounted. From having a quick > > look it doesn't seem that we need to share all the details in struct > > binderfs_info though. Maybe there is a better way to handle all this. > > Why would you need to share this internally with anything, again, it can > always be looked up if you need it. I just looked into this and you are right. Binder can just take sb->s_root and look up the entries as needed. This means we can also unexport all the binderfs_info bits from the internal header. Great! Thanks, -- Carlos Llamas