* [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all
@ 2017-12-09 11:53 Vincent Legoll
2017-12-09 12:40 ` Vincent Legoll
0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2017-12-09 11:53 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Byungchul Park, Peter Zijlstra,
Paul E. McKenney, Josh Poimboeuf, Geert Uytterhoeven,
Randy Dunlap, Luis R. Rodriguez, Nicholas Piggin,
Thomas Gleixner, linux-kernel
Cc: Vincent Legoll
No need to get into the submenu to disable all
"Memory Debugging"-related config entries.
This makes it easier to disable all "Memory Debugging" config options
without entering the submenu. It will also enable one to see that
en/dis-abled state from the outside menu.
This is only intended to change menuconfig UI, not change
the config dependencies.
Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
lib/Kconfig.debug | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 947d3e2ed5c2..5062f52dbeec 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -436,7 +436,10 @@ config DEBUG_KERNEL
Say Y here if you are developing drivers or trying to debug and
identify kernel problems.
-menu "Memory Debugging"
+menuconfig DEBUG_MEMORY
+ bool "Memory Debugging"
+
+if DEBUG_MEMORY
source mm/Kconfig.debug
@@ -731,7 +734,7 @@ config DEBUG_STACKOVERFLOW
source "lib/Kconfig.kasan"
-endmenu # "Memory Debugging"
+endif # DEBUG_MEMORY
config ARCH_HAS_KCOV
bool
--
2.14.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all
2017-12-09 11:53 [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all Vincent Legoll
@ 2017-12-09 12:40 ` Vincent Legoll
2017-12-09 17:04 ` Randy Dunlap
0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2017-12-09 12:40 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Byungchul Park, Peter Zijlstra,
Paul E. McKenney, Josh Poimboeuf, Geert Uytterhoeven,
Randy Dunlap, Luis R. Rodriguez, Nicholas Piggin,
Thomas Gleixner, Linux Kernel ML
Cc: Vincent Legoll
This patch introduces some Kconfig warnings:
warning: (X86) selects HAVE_DEBUG_KMEMLEAK which has unmet direct
dependencies (DEBUG_MEMORY)
warning: (X86) selects HAVE_ARCH_KASAN which has unmet direct
dependencies (DEBUG_MEMORY)
warning: (X86) selects ARCH_HAS_DEBUG_VIRTUAL which has unmet direct
dependencies (DEBUG_MEMORY)
warning: (X86) selects HAVE_DEBUG_STACKOVERFLOW which has unmet direct
dependencies (DEBUG_MEMORY)
What would be the best way to fix that ?
excluding those config options from the "if DEBUG_MEMORY" code
block seems to alleviate the warnings, but is that OK to do ?
Would moving them out of the if/endif block be acceptable ?
Thanks
--
Vincent Legoll
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all
2017-12-09 12:40 ` Vincent Legoll
@ 2017-12-09 17:04 ` Randy Dunlap
2017-12-09 17:40 ` [PATCH,v2] " Vincent Legoll
0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2017-12-09 17:04 UTC (permalink / raw)
To: Vincent Legoll, Andrew Morton, Ingo Molnar, Byungchul Park,
Peter Zijlstra, Paul E. McKenney, Josh Poimboeuf,
Geert Uytterhoeven, Luis R. Rodriguez, Nicholas Piggin,
Thomas Gleixner, Linux Kernel ML
On 12/09/2017 04:40 AM, Vincent Legoll wrote:
> This patch introduces some Kconfig warnings:
>
> warning: (X86) selects HAVE_DEBUG_KMEMLEAK which has unmet direct
> dependencies (DEBUG_MEMORY)
> warning: (X86) selects HAVE_ARCH_KASAN which has unmet direct
> dependencies (DEBUG_MEMORY)
> warning: (X86) selects ARCH_HAS_DEBUG_VIRTUAL which has unmet direct
> dependencies (DEBUG_MEMORY)
> warning: (X86) selects HAVE_DEBUG_STACKOVERFLOW which has unmet direct
> dependencies (DEBUG_MEMORY)
>
> What would be the best way to fix that ?
>
> excluding those config options from the "if DEBUG_MEMORY" code
> block seems to alleviate the warnings, but is that OK to do ?
>
> Would moving them out of the if/endif block be acceptable ?
That sounds OK to me since none of them have prompts, i.e., they are
not user visible, but they are indicators of what the arch supports.
--
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH,v2] Make "Memory Debugging" a menuconfig to ease disabling it all
2017-12-09 17:04 ` Randy Dunlap
@ 2017-12-09 17:40 ` Vincent Legoll
2017-12-09 17:40 ` [PATCH] " Vincent Legoll
0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2017-12-09 17:40 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Byungchul Park, Paul E. McKenney,
Peter Zijlstra, Geert Uytterhoeven, Josh Poimboeuf, Randy Dunlap,
Luis R. Rodriguez, Nicholas Piggin, Thomas Gleixner,
linux-kernel
The v2 of the patch tries to do that, but the Kconfig.kasan modification is kind
of infortunate, as it moves the HAVE_ARCH_KASAN config option out of that file.
If this is not acceptable please advise on how I can achieve it.
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all
2017-12-09 17:40 ` [PATCH,v2] " Vincent Legoll
@ 2017-12-09 17:40 ` Vincent Legoll
2017-12-13 11:04 ` Vincent Legoll
0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2017-12-09 17:40 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Byungchul Park, Paul E. McKenney,
Peter Zijlstra, Geert Uytterhoeven, Josh Poimboeuf, Randy Dunlap,
Luis R. Rodriguez, Nicholas Piggin, Thomas Gleixner,
linux-kernel
Cc: Vincent Legoll
No need to get into the submenu to disable all
"Memory Debugging"-related config entries.
This makes it easier to disable all "Memory Debugging" config options
without entering the submenu. It will also enable one to see that
en/dis-abled state from the outside menu.
This is only intended to change menuconfig UI, not change
the config dependencies.
Changes since v1:
Move some invisible config options ouit of the if/endif DEBUG_MEMORY
block to alleviate the warnings:
"selects XXX which has unmet direct dependencies"
This moves the HAVE_ARCH_KASAN out of Kconfig.kasan
Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
lib/Kconfig.debug | 28 +++++++++++++++++-----------
lib/Kconfig.kasan | 3 ---
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 947d3e2ed5c2..19ca76e7b9ed 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -436,7 +436,10 @@ config DEBUG_KERNEL
Say Y here if you are developing drivers or trying to debug and
identify kernel problems.
-menu "Memory Debugging"
+menuconfig DEBUG_MEMORY
+ bool "Memory Debugging"
+
+if DEBUG_MEMORY
source mm/Kconfig.debug
@@ -539,9 +542,6 @@ config SLUB_STATS
out which slabs are relevant to a particular load.
Try running: slabinfo -DA
-config HAVE_DEBUG_KMEMLEAK
- bool
-
config DEBUG_KMEMLEAK
bool "Kernel memory leak detector"
depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
@@ -636,9 +636,6 @@ config DEBUG_VM_PGFLAGS
If unsure, say N.
-config ARCH_HAS_DEBUG_VIRTUAL
- bool
-
config DEBUG_VIRTUAL
bool "Debug VM translations"
depends on DEBUG_KERNEL && ARCH_HAS_DEBUG_VIRTUAL
@@ -708,9 +705,6 @@ config DEBUG_HIGHMEM
This option enables additional error checking for high memory
systems. Disable for production systems.
-config HAVE_DEBUG_STACKOVERFLOW
- bool
-
config DEBUG_STACKOVERFLOW
bool "Check for stack overflows"
depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
@@ -731,7 +725,19 @@ config DEBUG_STACKOVERFLOW
source "lib/Kconfig.kasan"
-endmenu # "Memory Debugging"
+endif # DEBUG_MEMORY
+
+config HAVE_ARCH_KASAN
+ bool
+
+config ARCH_HAS_DEBUG_VIRTUAL
+ bool
+
+config HAVE_DEBUG_KMEMLEAK
+ bool
+
+config HAVE_DEBUG_STACKOVERFLOW
+ bool
config ARCH_HAS_KCOV
bool
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index bd38aab05929..2396d5116e20 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -1,6 +1,3 @@
-config HAVE_ARCH_KASAN
- bool
-
if HAVE_ARCH_KASAN
config KASAN
--
2.14.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all
2017-12-09 17:40 ` [PATCH] " Vincent Legoll
@ 2017-12-13 11:04 ` Vincent Legoll
2017-12-15 20:21 ` Pavel Machek
0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2017-12-13 11:04 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Byungchul Park, Paul E. McKenney,
Peter Zijlstra, Geert Uytterhoeven, Josh Poimboeuf, Randy Dunlap,
Luis R. Rodriguez, Nicholas Piggin, Thomas Gleixner,
Linux Kernel ML
Cc: Vincent Legoll
Hello,
looks like this one will need another spin, the kbuild test robot
found some config mix that has unmet dependencies.
Please drop until v3
--
Vincent Legoll
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all
2017-12-13 11:04 ` Vincent Legoll
@ 2017-12-15 20:21 ` Pavel Machek
0 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2017-12-15 20:21 UTC (permalink / raw)
To: Vincent Legoll
Cc: Andrew Morton, Ingo Molnar, Byungchul Park, Paul E. McKenney,
Peter Zijlstra, Geert Uytterhoeven, Josh Poimboeuf, Randy Dunlap,
Luis R. Rodriguez, Nicholas Piggin, Thomas Gleixner,
Linux Kernel ML
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
On Wed 2017-12-13 12:04:17, Vincent Legoll wrote:
> Hello,
>
> looks like this one will need another spin, the kbuild test robot
> found some config mix that has unmet dependencies.
>
> Please drop until v3
While you are at it, care to add a help text? It jumped on me doing
make oldconfig, and I was wondering what it is. It is _not_
self-explanatory.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-15 20:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-09 11:53 [PATCH] Make "Memory Debugging" a menuconfig to ease disabling it all Vincent Legoll
2017-12-09 12:40 ` Vincent Legoll
2017-12-09 17:04 ` Randy Dunlap
2017-12-09 17:40 ` [PATCH,v2] " Vincent Legoll
2017-12-09 17:40 ` [PATCH] " Vincent Legoll
2017-12-13 11:04 ` Vincent Legoll
2017-12-15 20:21 ` Pavel Machek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.