Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3011959pxu; Sat, 10 Oct 2020 16:03:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG2RuvhxhOJNS9AlrBnAjevy5a2wbBMgskrDGJ+XXj8lqC8KphnEB8bUDOPoJeTGgBK2o2 X-Received: by 2002:a17:906:2b85:: with SMTP id m5mr22163498ejg.143.1602371004701; Sat, 10 Oct 2020 16:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602371004; cv=none; d=google.com; s=arc-20160816; b=AwI0ALoivTmklFgHlSLNS/de+P8YY+rEmfVHmD3oYPQhn633/HmiKKVymT4D7t2j+I /zSNjFZ2rHTsA1wuDLe54l6O0GuuR7/ndN8mis7OTkG5UpidN3mN4Kg1eKdUAeDkJAqP 5uq+0iaj748wb5DEwDVLs21K0i2GIvUxdNVNZgvlLnUQlnROl9sBflXe3eBnthQ8QYqV 8FYm1oj9IvpsUGBa+e+EPLQtFRCVN0og6rpLTb7MFVb7+Lbthf3bG1tG2Wg0pRN7/+SV 2DJfJhLAS41rhmN2AiQHjsXQgfsjIpGSZVPWWMExklBf2LoqkwLCQmGtohAI25znQ/LN 6Ibw== 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=eDvJuMjxlkUnuAqB/l8C4rSR6M2JJ2n/7JU7I4+8ML0=; b=JP4XzxzGM8ZFeN4VWjCabLfHFBQ0t2jDhwsL0gJdcqEZYkGiVQdHacaaPG0CvkowcF 6FJqiqcZZ7lsaY3+IJzjUrnrSrixDUSRFRPajHTR69xzsZYysCBg7yYBdAtjWKstRwqc JFoiiwNoG1eXTPxon5E95VQOhUCXpp9F1ZeesBWc+OwGbtnI8fsSUVUoXEBGYwsnI/fa UtbaykpKkgMzchcL47fK5mvRA+uVLLMXfB66p/4aXv81UR5TzFtnZQfV40cCl4TuZJIB Keu0cOE3FhuIKbymhvckEyAzstZbOBdZZvc88odNt7Jxr2uYUImNUEuVwr7iQzJI0fnj wA4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dtZ9I9J0; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si9288783edr.141.2020.10.10.16.02.53; Sat, 10 Oct 2020 16:03:24 -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; dkim=pass header.i=@kernel.org header.s=default header.b=dtZ9I9J0; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388054AbgJJWxF (ORCPT + 99 others); Sat, 10 Oct 2020 18:53:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:57068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732643AbgJJTyp (ORCPT ); Sat, 10 Oct 2020 15:54:45 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8C811206D4; Sat, 10 Oct 2020 09:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602322660; bh=qEv/8rJuvBzSsznkGBS33zRs2V4OUf+87LXb5YdX2+I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dtZ9I9J0vKwRPkDwHW8WBmWGDTM10AY88wBp3bLQBuvUHQRud+qp5DiL/ceFF3ejE 3t7EPsC9kSZrsPO4mLwzAZTLmL8lRTvvvL3XCoWcyWWjN6hT3DuccOjsbqg7DAZPv0 DSvR4/Tzh8rM1ajkCHEPzQzfwI5evgrJY9vwENbU= Date: Sat, 10 Oct 2020 11:38:24 +0200 From: Greg KH To: Johannes Berg 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 Subject: Re: [CRAZY-RFF] debugfs: track open files and release on remove Message-ID: <20201010093824.GA986556@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> <01fcaf4985f57d97ac03fc0b7deb2c225a2fbca1.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01fcaf4985f57d97ac03fc0b7deb2c225a2fbca1.camel@sipsolutions.net> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Oct 09, 2020 at 10:48:09AM +0200, Johannes Berg wrote: > 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? Bad choice of terms, it would "fail" in that this type of check would never actually work because the debugfs code is built into the kernel, and there is no module owner for it. But the value it is referencing is an address in a module. > > 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? Isn't this the same issue? thanks, greg k-h