Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1873557pxu; Fri, 9 Oct 2020 01:49:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz60QqHHCwhiWS7PCKnSRflRNOTMIqzPSC/6QAHzC1LO6gJas8kCr3rVaIfWKrsvrmoDLcT X-Received: by 2002:a05:6402:396:: with SMTP id o22mr13215073edv.361.1602233378403; Fri, 09 Oct 2020 01:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602233378; cv=none; d=google.com; s=arc-20160816; b=cuKPiuF6igV5073SujxrjMfJsjXh+bOsr0JpSmEDXKncyRQwQMpz4/+EF86uyr4dYB +R0/cTocMI0ib/AdQO1O08X+n52ufqO0SPmZM4dKm5BjzmF4G3D9dolWTK74uO055KGu wAJ6xEXng3kRM8tJh4Hjp94N6qNSL8iwMcjKGf/b1nmN8rA4KHAYswdHf3qKE9aU2JtB pTxDJte/+zCng07OSifeW6iyIlamOrKLGHhS7jx7ljVcZsVxjQ7K2oiUxhlIsdvzooOj qpKNxGO2n2YsBIOEzrIq0ym8Yt0cYjg4yKhdeIyDVIRUhJvSwVA2n28iF+8qQQY0uWeS swPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=9O46qCIeWaOqse1zJF3Fuqh/NU76yxOVF7Jf7KAjKHE=; b=lOW1auhnIZc9MfARzWkQW318T0Isoyy5BclBuXo1RiZk38BXoiFPsiX2eOAQpXEB4+ XA3eyoKQP259Vkzn0wW6VIadpQ9vbubEXy4f+0WSjsxnMTHgcxHiGLCV06SckDAajqi2 uXgZcCmgBlK3hv5y1X7qeTHnXUEdE1h5uR0pX6iqPpglNgPXJyM2tTtIiuGUAqT2ZZzd lQIpRejeGmZSJhIJ9k0vD8xeZW8q8vBi+8aeKMg8z1MnnBGW/V6BGu6suDZapNoezEDD lXeqcYdDElv71nT9cw76Z6QktZJIn2qiBNwoqfI4dp2KuFSqd3n+tpvHaMQKlJNduvz2 9xsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 i23si5831339edg.229.2020.10.09.01.49.13; Fri, 09 Oct 2020 01:49:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732907AbgJIIsQ (ORCPT + 99 others); Fri, 9 Oct 2020 04:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730726AbgJIIsO (ORCPT ); Fri, 9 Oct 2020 04:48:14 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84542C0613D2; Fri, 9 Oct 2020 01:48:14 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kQo4R-002AJo-EB; Fri, 09 Oct 2020 10:48:11 +0200 Message-ID: <01fcaf4985f57d97ac03fc0b7deb2c225a2fbca1.camel@sipsolutions.net> Subject: Re: [CRAZY-RFF] debugfs: track open files and release on remove From: Johannes Berg To: Greg KH Cc: linux-kernel@vger.kernel.org, nstange@suse.de, ap420073@gmail.com, David.Laight@aculab.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, rafael@kernel.org Date: Fri, 09 Oct 2020 10:48:09 +0200 In-Reply-To: <20201009084729.GA406522@kroah.com> References: <87v9fkgf4i.fsf@suse.de> <20201009095306.0d87c3aa13db.Ib3a7019bff15bb6308f6d259473a1648312a4680@changeid> <20201009080355.GA398994@kroah.com> <20201009081624.GA401030@kroah.com> <1ec056cf3ec0953d2d1abaa05e37e89b29c7cc63.camel@sipsolutions.net> <20201009084729.GA406522@kroah.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2020-10-09 at 10:47 +0200, Greg KH wrote: > > I think adding the .owner everywhere would be good, and perhaps we can > > somehow put a check somewhere like > > > > WARN_ON(is_module_address((unsigned long)fops) && !fops->owner); > > > > to prevent the issue in the future? > > That will fail for all of the debugfs_create_* operations, as there is > only one set of file operations for all of the different files created > with these calls. Why would it fail? Those have their fops in the core debugfs code, which might have a .owner assigned but is probably built-in anyway? > Which, now that I remember it, is why we went down the proxy "solution" > in the first place :( Not sure I understand. That was related more to (arbitrary) files having to be disappeared rather than anything else? johannes