Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp452125ybl; Thu, 23 Jan 2020 01:37:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxdvxhwAgaLfxfWFt7F9eNtiTlj7fIO9s5VOuSzWZ8P2SeX2w/r0O6rF6jtehFXqx8hZTmG X-Received: by 2002:a9d:1d02:: with SMTP id m2mr10230526otm.45.1579772271051; Thu, 23 Jan 2020 01:37:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579772271; cv=none; d=google.com; s=arc-20160816; b=wLoZVS1QgQKMfV7caX2/JZ5J+5dbPNyySHe7+POr3sGZgyS0+82vRjWoC+ZT8XRd81 wUyCjscakJ73DlgnwNJ8DrTs484GFEFH5NkvLtuSLI17a/XmqRIh8fM/71WXivUojfi8 x07xL3qEpXlHhcc50WPRZGd3FEIzXfliSHGg8r8pxYm0feoz6ojRMgxFgs+7S/QFKZZL 66InaV21x2SJWgfO+Dzsg5dgV+D2GvT86/HthtVUvg2ociNp2YbK1WDdDsMW7HzR0GJP knlnHFgAUKFNKYqBWqvIA1+8gIW/GETfmrXwHtVoB5cbKTxMw6YZCxkotBxqDt/i8od0 xzVA== 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:dkim-signature; bh=dFmETogQ8klhthl99DZ+H7kwMIgn87pphYjYfBzbk4w=; b=bZlqhA/NSTI+DoImXWzmAT+AkXqi/paK67fkMHi1mOeYXmbd0SDV7tP1HNjVrrfti3 PFPfh8fejuayNUORGalw2hlgfsW6RYqgA78uW3y4z3DH+0kLCYWkf/1RcHL4SktLEsUr UpiEgq1GxCFeGQSO3THdMnD1OxKcbQlF6wBzD/MjHtzJ6pQk6TJmFFzwDv45vO7YHG05 78DF3/l6wXTQsYr51cSDLj4IXBcoLfFt5yu8vLWGp1Sz4rUe9iR4kGO2KW/ZjjClJjQO R17FO+WZZI4V/WIC4zA3Sy2gphCM4ivSQvIL6OOqVm7YwB9v85XmVYuSUII1fN8z8NbN DQ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tf4QUMKz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17si855814otk.218.2020.01.23.01.37.39; Thu, 23 Jan 2020 01:37:51 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=tf4QUMKz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbgAWJgh (ORCPT + 99 others); Thu, 23 Jan 2020 04:36:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:45370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbgAWJge (ORCPT ); Thu, 23 Jan 2020 04:36:34 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 7F44F22522; Thu, 23 Jan 2020 09:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579772193; bh=gyt2Y4k10a3KJebAv2MMSWVNSPdTsVts58bB8fCDjL8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tf4QUMKz4/iknb74dTGe//f79onqkHHOGUngMEcibhz+JKsK+yfhUP5cOxiln+/UX aD9Vdm7G6BwbcU5K4jvPMh1ZBsUjXgWEn7X2xyKquMAw1Sio6ZDnJN+AlJ22RcK7CZ 1+NwCRTz9RlboaYose8yTkUgmZHncZ1d8PrpRjPM= Date: Thu, 23 Jan 2020 09:36:28 +0000 From: Will Deacon To: Greg Kroah-Hartman Cc: Jason Baron , Randy Dunlap , linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v4] dynamic_debug: allow to work if debugfs is disabled Message-ID: <20200123093628.GA18991@willie-the-truck> References: <20200122074343.GA2099098@kroah.com> <20200122080352.GA15354@willie-the-truck> <20200122081205.GA2227985@kroah.com> <20200122135352.GA9458@kroah.com> <8d68b75c-05b8-b403-0a10-d17b94a73ba7@akamai.com> <20200122192940.GA88549@kroah.com> <20200122193118.GA88722@kroah.com> <20200123084847.GA435637@kroah.com> <20200123085015.GA436361@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200123085015.GA436361@kroah.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 23, 2020 at 09:50:15AM +0100, Greg Kroah-Hartman wrote: > With the realization that having debugfs enabled on "production" systems is > generally not a good idea, debugfs is being disabled from more and more > platforms over time. However, the functionality of dynamic debugging still is > needed at times, and since it relies on debugfs for its user api, having > debugfs disabled also forces dynamic debug to be disabled. > > To get around this, move the "control" file for dynamic_debug to procfs IFF > debugfs is disabled. This lets people turn on debugging as needed at runtime > for individual driverfs and subsystems. > > Reported-by: many different companies > Cc: Jason Baron > Signed-off-by: Greg Kroah-Hartman > --- > v4: tweaks to the .rst text thanks to Randy's review > v3: rename init function as it is now no longer just for debugfs, thanks > to Jason for the review. > Fix build warning for debugfs_initialized call. > v2: Fix up octal permissions and add procfs reference to the Kconfig > entry, thanks to Will for the review. > > .../admin-guide/dynamic-debug-howto.rst | 3 +++ > lib/Kconfig.debug | 7 ++++--- > lib/dynamic_debug.c | 21 ++++++++++++++----- > 3 files changed, 23 insertions(+), 8 deletions(-) I had a brief "oh crap" moment when I thought you were exposing both the procfs and debugfs interfaces at the same time, but thankfully that's not the case. Whilst it's a bit of a shame that it's come to this, the code looks pretty decent to me, so: Acked-by: Will Deacon Thanks, Will