[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200123093628.GA18991@willie-the-truck>
Date: Thu, 23 Jan 2020 09:36:28 +0000
From: Will Deacon <will@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jason Baron <jbaron@...mai.com>,
Randy Dunlap <rdunlap@...radead.org>,
linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH v4] dynamic_debug: allow to work if debugfs is disabled
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 <jbaron@...mai.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
> 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 <will@...nel.org>
Thanks,
Will
Powered by blists - more mailing lists