Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
PATCH 1/1 Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Several debugging options currently default to y, such as CONFIG_DEBUG_BUGVERBOSE and CONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning on CONFIG_DEBUG_KERNEL to unhide them. Since CONFIG_DEBUG_KERNEL exists specifically to unhide debugging options, and CONFIG_EXPERT exists specifically to unhide options potentially needed by experts and/or embedded users, make CONFIG_EXPERT automatically imply CONFIG_DEBUG_KERNEL.
---
Revised as requested by Ingo Molnar.
init/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
init/Kconfig +1 -0
@@ -909,6 +909,7 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized
Signature · 1 line
1.7.5.3
Quoted 22 lines · Josh Triplett
Several debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning onCONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Signed-off-by Josh Triplett <[email protected]>---
Revised as requested by Ingo Molnar.
init/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)init/Kconfig +0
-0
init/Kconfig config ANON_INODES · line 912
Quoted 4 lines
init/Kconfig +1
-0@@ -909,6 +909,7 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + select DEBUG_KERNEL
Please add a quick comment that explains the reason for that select. Because without that changelog, it's very non obvious.
Thanks.
Quoted 11 lines
init/Kconfig +0
-0help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specializedSignature · 7 lines
1.7.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
PATCH v2 1/1 Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Several debugging options currently default to y, such as CONFIG_DEBUG_BUGVERBOSE and CONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning on CONFIG_DEBUG_KERNEL to unhide them. Since CONFIG_DEBUG_KERNEL exists specifically to unhide debugging options, and CONFIG_EXPERT exists specifically to unhide options potentially needed by experts and/or embedded users, make CONFIG_EXPERT automatically imply CONFIG_DEBUG_KERNEL.
---
v2: Add a comment explaining the select of DEBUG_KERNEL, as suggested by Frederic Weisbecker.
init/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
init/Kconfig +2 -0
@@ -909,6 +909,8 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + # Unhide debug options, to make the on-by-default options visible + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized
Signature · 1 line
1.7.5.3
[tip:core/debug] debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Commit-ID: f505c553dbe24b18a8590eb0eb5890a839acd0c3 Gitweb: http://git.kernel.org/tip/f505c553dbe24b18a8590eb0eb5890a839acd0c3 Author: Josh Triplett <[email protected]> AuthorDate: Sun, 5 Jun 2011 18:23:58 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 7 Jun 2011 00:05:15 +0200
debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Several debugging options currently default to y, such as CONFIG_DEBUG_BUGVERBOSE and CONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning on CONFIG_DEBUG_KERNEL to unhide them. Since CONFIG_DEBUG_KERNEL exists specifically to unhide debugging options, and CONFIG_EXPERT exists specifically to unhide options potentially needed by experts and/or embedded users, make CONFIG_EXPERT automatically imply CONFIG_DEBUG_KERNEL.
--- init/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
init/Kconfig +2 -0
@@ -909,6 +909,8 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + # Unhide debug options, to make the on-by-default options visible + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized
Quoted 22 lines · Josh Triplett
Several debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning onCONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Signed-off-by Josh Triplett <[email protected]>---
Revised as requested by Ingo Molnar.
init/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)init/Kconfig +0
-0
init/Kconfig config ANON_INODES · line 915
Quoted 7 lines
init/Kconfig +1
-0@@ -909,6 +909,7 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized
So now that it's selected, mind removing the superfluous EXPERT bits from the Kconfig files that have it?
Thanks,
Ingo
PATCH v3 1/1 Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Several debugging options currently default to y, such as CONFIG_DEBUG_BUGVERBOSE and CONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning on CONFIG_DEBUG_KERNEL to unhide them. Since CONFIG_DEBUG_KERNEL exists specifically to unhide debugging options, and CONFIG_EXPERT exists specifically to unhide options potentially needed by experts and/or embedded users, make CONFIG_EXPERT automatically imply CONFIG_DEBUG_KERNEL.
Change various debugging options to only reference DEBUG_KERNEL, not EXPERT.
Note that DEBUG_MEMORY_INIT defaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".) Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.
---
v3: Changed other debugging options to stop referencing EXPERT.
arch/tile/Kconfig.debug | 2 +- init/Kconfig | 2 ++ lib/Kconfig.debug | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-)
arch/tile/Kconfig.debug +1 -1
@@ -3,7 +3,7 @@ menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK - bool "Early printk" if EXPERT && DEBUG_KERNEL + bool "Early printk" if DEBUG_KERNEL default y help Write kernel log output directly via the hypervisor console.
init/Kconfig +2 -0
@@ -909,6 +909,8 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + # Unhide debug options, to make the on-by-default options visible + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized
lib/Kconfig.debug +3 -3
@@ -694,7 +694,7 @@ config DEBUG_HIGHMEM Disable for production systems. config DEBUG_BUGVERBOSE - bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT + bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL depends on BUG depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || \ FRV || SUPERH || GENERIC_BUG || BLACKFIN || MN10300 || TILE
@@ -766,8 +766,8 @@ config DEBUG_WRITECOUNT If unsure, say N. config DEBUG_MEMORY_INIT - bool "Debug memory initialisation" if EXPERT - default !EXPERT + bool "Debug memory initialisation" if DEBUG_KERNEL + default y help Enable this for additional checks during memory initialisation. The sanity checks verify aspects of the VM such as the memory model
Signature · 1 line
1.7.5.3
Quoted 11 lines · Josh Triplett
Several debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning onCONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.
Ok, so ideally this should have been done in two patches. They are both different logical changes that don't imply the same.
v2 was fine, and should be an independent change.
But some comment on what was added in this v3 below:
Quoted 23 lines
Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".) Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.Signed-off-by Josh Triplett <[email protected]>---
v3: Changed other debugging options to stop referencing EXPERT.
arch/tile/Kconfig.debug | 2 +- init/Kconfig | 2 ++ lib/Kconfig.debug | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-)arch/tile/Kconfig.debug +0
-0
arch/tile/Kconfig.debug menu "Kernel hacking" · line 7
Quoted 6 lines
arch/tile/Kconfig.debug +1
-1@@ -3,7 +3,7 @@ menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK - bool "Early printk" if EXPERT && DEBUG_KERNEL + bool "Early printk" if DEBUG_KERNEL default y
I don't understand why early_printk is default y. But that's debatable, we may want to have any user able to run a raw vga console for debugging requests.
Either:
- if we consider it's very important and mandatory, let's keep it "if EXPERT" and default y.
- if we consider it's only used by kernel developers, it should be off by default and depend on DEBUG_KERNEL only.
Quoted 20 lines
arch/tile/Kconfig.debug +0
-0help Write kernel log output directly via the hypervisor console.init/Kconfig +2
-0@@ -909,6 +909,8 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + # Unhide debug options, to make the on-by-default options visible + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specializedlib/Kconfig.debug +0
-0
lib/Kconfig.debug config DEBUG_HIGHMEM · line 697
Quoted 5 lines
lib/Kconfig.debug +1
-1@@ -694,7 +694,7 @@ config DEBUG_HIGHMEM Disable for production systems. config DEBUG_BUGVERBOSE - bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT + bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL
I believe this should not be changed, let keep it how it is, or change to "if EXPERT" because EXPERT selects DEBUG_KERNEL anyway.
There are no good reason to disable this option, except for some embedded system perhaps, so EXPERT still make sense here.
Thanks.
Quoted 10 lines · Frederic Weisbecker
Quoted 9 lines · Josh Triplett
Several debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning onCONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.
Quoted 5 lines
Quoted 2 lines
Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.Ok, so ideally this should have been done in two patches. They are both different logical changes that don't imply the same.
Fair enough; I'd considered whether to split this patch or not, and ended up with "not" on the theory that this seemed like a case of "fix an API and fix up the callers", but I can easily split it in v4.
Quoted 37 lines
v2 was fine, and should be an independent change.
But some comment on what was added in this v3 below:
Quoted 22 lines
Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".) Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.Signed-off-by Josh Triplett <[email protected]>---
v3: Changed other debugging options to stop referencing EXPERT.
arch/tile/Kconfig.debug | 2 +- init/Kconfig | 2 ++ lib/Kconfig.debug | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-)arch/tile/Kconfig.debug +0
-0arch/tile/Kconfig.debug menu "Kernel hacking" · line 7
Quoted 6 lines
arch/tile/Kconfig.debug +1
-1@@ -3,7 +3,7 @@ menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK - bool "Early printk" if EXPERT && DEBUG_KERNEL + bool "Early printk" if DEBUG_KERNEL default yI don't understand why
early_printkis default y. But that's debatable, we may want to have any user able to run a raw vga console for debugging requests.
Quoted 7 lines
Either:
- if we consider it's very important and mandatory, let's keep it "if EXPERT" and default y.
- if we consider it's only used by kernel developers, it should be off by default and depend on
DEBUG_KERNELonly.
Note that this change occurs in arch/tile/Kconfig.debug; you'd have to ask the Tile architecture developers about the rationale there. For the purposes of this change, I'd prefer not to make any semantic change there. Based on your explanation, that probably means I should change it to "if EXPERT" rather than "if DEBUG_KERNEL", keeping the current behavior of "only experts can turn this off". I'll do that in v4.
Quoted 12 lines
lib/Kconfig.debug config DEBUG_HIGHMEM · line 697
Quoted 8 lines
lib/Kconfig.debug +1
-1@@ -694,7 +694,7 @@ config DEBUG_HIGHMEM Disable for production systems. config DEBUG_BUGVERBOSE - bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT + bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNELI believe this should not be changed, let keep it how it is, or change to "if EXPERT" because EXPERT selects
DEBUG_KERNELanyway.
Quoted 2 lines
There are no good reason to disable this option, except for some embedded system perhaps, so EXPERT still make sense here.
I guess this matches the rationale above for tile's EARLY_PRINTK; I'll use "if EXPERT" to preserve the behavior of "only experts can turn this off". To me it seems equivalent to any other debug option, and I don't really see the harm in allowing users to turn it off if they turned on DEBUG_KERNEL, but nevertheless this patch shouldn't make that kind of semantic change.
- Josh Triplett
Quoted 14 lines · Josh Triplett
Quoted 13 lines · Frederic Weisbecker
Quoted 11 lines · Josh Triplett
Several debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning onCONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.
Quoted 6 lines
Quoted 2 lines
Ok, so ideally this should have been done in two patches. They are both different logical changes that don't imply the same.
Fair enough; I'd considered whether to split this patch or not, and ended up with "not" on the theory that this seemed like a case of "fix an API and fix up the callers", but I can easily split it in v4.
You haven't just fixed the API and propagated to the callers accordingly. What you did is to fix the API and also completely change the behaviour of the callers.
You have changed EXPERT to imply DEBUG_KERNEL.
You'd have fixed the callers accordingly if you only changed "depend on EXPERT && DEBUG_KERNEL" into "depend on EXPERT" in the callers, because if EXPERT => DEBUG_KERNEL then (EXPERT && DEBUG_KERNEL) == EXPERT. Thus it would have fit into the same logic and gathering the whole into a single patch would have made sense (although that's debatable, I would have cut that personally, but we don't care at that level).
Now changing callers that "depend on EXPERT && DEBUG_KERNEL" to "depend on DEBUG_KERNEL" subscribes to a completely different logical change. It has actually even nothing to deal with the previous change. You can make that behaviour change even without having EXPERT => DEBUG_KERNEL.
So not only you gathered two different logical changes into a same patch, but the two things even hardly have any connection together.
Quoted 45 lines
Quoted 37 lines
v2 was fine, and should be an independent change.
But some comment on what was added in this v3 below:
Quoted 22 lines
Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".) Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.Signed-off-by Josh Triplett <[email protected]>---
v3: Changed other debugging options to stop referencing EXPERT.
arch/tile/Kconfig.debug | 2 +- init/Kconfig | 2 ++ lib/Kconfig.debug | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-)arch/tile/Kconfig.debug +0
-0arch/tile/Kconfig.debug menu "Kernel hacking" · line 7
Quoted 6 lines
arch/tile/Kconfig.debug +1
-1@@ -3,7 +3,7 @@ menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK - bool "Early printk" if EXPERT && DEBUG_KERNEL + bool "Early printk" if DEBUG_KERNEL default yI don't understand why
early_printkis default y. But that's debatable, we may want to have any user able to run a raw vga console for debugging requests.Quoted 7 lines
Either:
- if we consider it's very important and mandatory, let's keep it "if EXPERT" and default y.
- if we consider it's only used by kernel developers, it should be off by default and depend on
DEBUG_KERNELonly.
Quoted 6 lines
Note that this change occurs in
arch/tile/Kconfig.debug; you'd have to ask the Tile architecture developers about the rationale there. For the purposes of this change, I'd prefer not to make any semantic change there. Based on your explanation, that probably means I should change it to "if EXPERT" rather than "ifDEBUG_KERNEL", keeping the current behavior of "only experts can turn this off". I'll do that in v4.
Ah it's in tile! I read that part too quickly, sorry. Yeah let them deal with that and only have "depend on EXPERT"
Quoted 12 lines
Quoted 12 lines
lib/Kconfig.debug config DEBUG_HIGHMEM · line 697
Quoted 8 lines
lib/Kconfig.debug +1
-1@@ -694,7 +694,7 @@ config DEBUG_HIGHMEM Disable for production systems. config DEBUG_BUGVERBOSE - bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT + bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNELI believe this should not be changed, let keep it how it is, or change to "if EXPERT" because EXPERT selects
DEBUG_KERNELanyway.
Quoted 6 lines
Quoted 2 lines
There are no good reason to disable this option, except for some embedded system perhaps, so EXPERT still make sense here.
I guess this matches the rationale above for tile's
EARLY_PRINTK; I'll use "if EXPERT" to preserve the behavior of "only experts can turn this off".
Cool.
Quoted 4 lines
To me it seems equivalent to any other debug option, and I don't really see the harm in allowing users to turn it off if they turned on
DEBUG_KERNEL, but nevertheless this patch shouldn't make that kind of semantic change.
It's not equivalent to other kernel debug options because unlike most other debug options we don't want only kernel developers to enable it, we want everyone to enable it.
If you let this option to be easily turned off, people may disable it by mistake and then developers will suddenly receive useless bug reports, which can be a frustrating experience.
There is no good reason to disable it except in some particular embedded cases I guess.
Quoted 18 lines · Frederic Weisbecker
Quoted 17 lines · Josh Triplett
Quoted 15 lines · Frederic Weisbecker
Quoted 11 lines · Josh Triplett
Several debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning onCONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.Ok, so ideally this should have been done in two patches. They are both different logical changes that don't imply the same.
Quoted 8 lines
Quoted 3 lines
Fair enough; I'd considered whether to split this patch or not, and ended up with "not" on the theory that this seemed like a case of "fix an API and fix up the callers", but I can easily split it in v4.
You haven't just fixed the API and propagated to the callers accordingly. What you did is to fix the API and also completely change the behaviour of the callers.
You have changed EXPERT to imply
DEBUG_KERNEL.
yes, i suggested that, because it leads to a more maintainable (EXPERT noise free) DEBUG_KERNEL Kconfig section.
Quoted 7 lines
You'd have fixed the callers accordingly if you only changed "depend on EXPERT &&
DEBUG_KERNEL" into "depend on EXPERT" in the callers, because if EXPERT =>DEBUG_KERNELthen (EXPERT &&DEBUG_KERNEL) == EXPERT. Thus it would have fit into the same logic and gathering the whole into a single patch would have made sense (although that's debatable, I would have cut that personally, but we don't care at that level).
Hm, that's my fault - i missed that.
Thanks,
Ingo
PATCH v4 1/1 Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
In reply to Josh TriplettSeveral debugging options currently default to y, such as CONFIG_DEBUG_BUGVERBOSE and CONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning on CONFIG_DEBUG_KERNEL to unhide them. Since CONFIG_DEBUG_KERNEL exists specifically to unhide debugging options, and CONFIG_EXPERT exists specifically to unhide options potentially needed by experts and/or embedded users, make CONFIG_EXPERT automatically imply CONFIG_DEBUG_KERNEL.
Since EXPERT now implies DEBUG_KERNEL, change debugging options that reference DEBUG_KERNEL && EXPERT to just reference EXPERT.
---
v4: Avoid semantic changes, by changing DEBUG_KERNEL && EXPERT to EXPERT rather than to DEBUG_KERNEL. This avoids exposing debug options that only experts should turn off, such as DEBUG_BUGVERBOSE.
A subsequent patch should probably go through and change the various "default !EXPERT" lines to "default y", since enabling CONFIG_EXPERT should not directly change anything.
arch/tile/Kconfig.debug | 2 +- init/Kconfig | 2 ++ lib/Kconfig.debug | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-)
arch/tile/Kconfig.debug +1 -1
@@ -3,7 +3,7 @@ menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK - bool "Early printk" if EXPERT && DEBUG_KERNEL + bool "Early printk" if EXPERT default y help Write kernel log output directly via the hypervisor console.
init/Kconfig +2 -0
@@ -909,6 +909,8 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + # Unhide debug options, to make the on-by-default options visible + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized
lib/Kconfig.debug +1 -1
@@ -694,7 +694,7 @@ config DEBUG_HIGHMEM Disable for production systems. config DEBUG_BUGVERBOSE - bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT + bool "Verbose BUG() reporting (adds 70K)" if EXPERT depends on BUG depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || \ FRV || SUPERH || GENERIC_BUG || BLACKFIN || MN10300 || TILE
Signature · 1 line
1.7.5.3
Quoted 9 lines · Josh Triplett
Several debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA. Embedded users might want to turn those options off to save space; however, turning them off requires turning onCONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.
Quoted 4 lines
Since EXPERT now implies
DEBUG_KERNEL, change debugging options that referenceDEBUG_KERNEL&& EXPERT to just reference EXPERT.Signed-off-by Josh Triplett <[email protected]>
Ingo, is it possible to zap the old one from the tree and apply this one instead?
Or may be Josh can send an incremental patch instead (I just feel bad in advance to ask him for a v5 :)
[tip:core/debug] debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
In reply to Josh TriplettCommit-ID: 2458073da04571182748aa4289630dca52ba63cc Gitweb: http://git.kernel.org/tip/2458073da04571182748aa4289630dca52ba63cc Author: Josh Triplett <[email protected]> AuthorDate: Mon, 6 Jun 2011 09:51:30 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 6 Jun 2011 19:30:01 +0200
debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Several debugging options currently default to y, such as CONFIG_DEBUG_BUGVERBOSE and CONFIG_DEBUG_RODATA.
Embedded users might want to turn those options off to save space; however, turning them off requires turning on CONFIG_DEBUG_KERNEL to unhide them. Since CONFIG_DEBUG_KERNEL exists specifically to unhide debugging options, and CONFIG_EXPERT exists specifically to unhide options potentially needed by experts and/or embedded users, make CONFIG_EXPERT automatically imply CONFIG_DEBUG_KERNEL.
Change various debugging options to only reference DEBUG_KERNEL, not EXPERT.
Note that DEBUG_MEMORY_INIT defaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".)
Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.
--- arch/tile/Kconfig.debug | 2 +- init/Kconfig | 2 ++ lib/Kconfig.debug | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-)
arch/tile/Kconfig.debug +1 -1
@@ -3,7 +3,7 @@ menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK - bool "Early printk" if EXPERT && DEBUG_KERNEL + bool "Early printk" if DEBUG_KERNEL default y help Write kernel log output directly via the hypervisor console.
init/Kconfig +2 -0
@@ -909,6 +909,8 @@ config ANON_INODES menuconfig EXPERT bool "Configure standard kernel features (expert users)" + # Unhide debug options, to make the on-by-default options visible + select DEBUG_KERNEL help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized
lib/Kconfig.debug +3 -3
@@ -694,7 +694,7 @@ config DEBUG_HIGHMEM Disable for production systems. config DEBUG_BUGVERBOSE - bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT + bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL depends on BUG depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || \ FRV || SUPERH || GENERIC_BUG || BLACKFIN || MN10300 || TILE
@@ -766,8 +766,8 @@ config DEBUG_WRITECOUNT If unsure, say N. config DEBUG_MEMORY_INIT - bool "Debug memory initialisation" if EXPERT - default !EXPERT + bool "Debug memory initialisation" if DEBUG_KERNEL + default y help Enable this for additional checks during memory initialisation. The sanity checks verify aspects of the VM such as the memory model
Re: [tip:core/debug] debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Quoted 27 lines · tip-bot for Josh Triplett
Commit-ID: 2458073da04571182748aa4289630dca52ba63cc Gitweb: http://git.kernel.org/tip/2458073da04571182748aa4289630dca52ba63cc Author: Josh Triplett <[email protected]> AuthorDate: Mon, 6 Jun 2011 09:51:30 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 6 Jun 2011 19:30:01 +0200debug: Make
CONFIG_EXPERTselectCONFIG_DEBUG_KERNELto unhide debug optionsSeveral debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA.Embedded users might want to turn those options off to save space; however, turning them off requires turning on
CONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".)
Quoted 6 lines
Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.
Signed-off-by Josh Triplett <[email protected]>
No, Nacked actually. I'm fine with the v2 that only changed the EXPERT config to imply DEBUG_KERNEL. But all the other changes here need to be revised, as I outlined in the thread.
Re: [tip:core/debug] debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Quoted 32 lines · Frederic Weisbecker
Quoted 31 lines · tip-bot for Josh Triplett
Commit-ID: 2458073da04571182748aa4289630dca52ba63cc Gitweb: http://git.kernel.org/tip/2458073da04571182748aa4289630dca52ba63cc Author: Josh Triplett <[email protected]> AuthorDate: Mon, 6 Jun 2011 09:51:30 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 6 Jun 2011 19:30:01 +0200debug: Make
CONFIG_EXPERTselectCONFIG_DEBUG_KERNELto unhide debug optionsSeveral debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA.Embedded users might want to turn those options off to save space; however, turning them off requires turning on
CONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".)Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Josh Triplett <[email protected]>No, Nacked actually. I'm fine with the v2 that only changed the EXPERT config to imply
DEBUG_KERNEL. But all the other changes here need to be revised, as I outlined in the thread.
Fixed in v4; please replace the patch in tip with that.
- Josh Triplett
Re: [tip:core/debug] debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Quoted 33 lines · Josh Triplett
Quoted 32 lines · Frederic Weisbecker
Quoted 31 lines · tip-bot for Josh Triplett
Commit-ID: 2458073da04571182748aa4289630dca52ba63cc Gitweb: http://git.kernel.org/tip/2458073da04571182748aa4289630dca52ba63cc Author: Josh Triplett <[email protected]> AuthorDate: Mon, 6 Jun 2011 09:51:30 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 6 Jun 2011 19:30:01 +0200debug: Make
CONFIG_EXPERTselectCONFIG_DEBUG_KERNELto unhide debug optionsSeveral debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA.Embedded users might want to turn those options off to save space; however, turning them off requires turning on
CONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".)Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by Josh Triplett <[email protected]>No, Nacked actually. I'm fine with the v2 that only changed the EXPERT config to imply
DEBUG_KERNEL. But all the other changes here need to be revised, as I outlined in the thread.Fixed in v4; please replace the patch in tip with that.
i applied the much simpler v2 twoliner version instead.
Thanks,
Ingo
Re: [tip:core/debug] debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Quoted 39 lines · Ingo Molnar
Quoted 36 lines · Josh Triplett
Quoted 35 lines · Frederic Weisbecker
Quoted 33 lines · tip-bot for Josh Triplett
Commit-ID: 2458073da04571182748aa4289630dca52ba63cc Gitweb: http://git.kernel.org/tip/2458073da04571182748aa4289630dca52ba63cc Author: Josh Triplett <[email protected]> AuthorDate: Mon, 6 Jun 2011 09:51:30 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 6 Jun 2011 19:30:01 +0200debug: Make
CONFIG_EXPERTselectCONFIG_DEBUG_KERNELto unhide debug optionsSeveral debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA.Embedded users might want to turn those options off to save space; however, turning them off requires turning on
CONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".)Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.
Signed-off-by Josh Triplett <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
No, Nacked actually. I'm fine with the v2 that only changed the EXPERT config to imply
DEBUG_KERNEL. But all the other changes here need to be revised, as I outlined in the thread.Fixed in v4; please replace the patch in tip with that.
i applied the much simpler v2 twoliner version instead.
OK...
So, should I prepare a separate patch which changes the instances of DEBUG_KERNEL && EXPERT, or just leave them?
- Josh Triplett
Re: [tip:core/debug] debug: Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to unhide debug options
Quoted 44 lines · Josh Triplett
Quoted 43 lines · Ingo Molnar
Quoted 40 lines · Josh Triplett
Quoted 38 lines · Frederic Weisbecker
Quoted 27 lines · tip-bot for Josh Triplett
Commit-ID: 2458073da04571182748aa4289630dca52ba63cc Gitweb: http://git.kernel.org/tip/2458073da04571182748aa4289630dca52ba63cc Author: Josh Triplett <[email protected]> AuthorDate: Mon, 6 Jun 2011 09:51:30 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 6 Jun 2011 19:30:01 +0200debug: Make
CONFIG_EXPERTselectCONFIG_DEBUG_KERNELto unhide debug optionsSeveral debugging options currently default to y, such as
CONFIG_DEBUG_BUGVERBOSEandCONFIG_DEBUG_RODATA.Embedded users might want to turn those options off to save space; however, turning them off requires turning on
CONFIG_DEBUG_KERNELto unhide them. SinceCONFIG_DEBUG_KERNELexists specifically to unhide debugging options, andCONFIG_EXPERTexists specifically to unhide options potentially needed by experts and/or embedded users, makeCONFIG_EXPERTautomatically implyCONFIG_DEBUG_KERNEL.Change various debugging options to only reference
DEBUG_KERNEL, not EXPERT.Note that
DEBUG_MEMORY_INITdefaulted to !EXPERT, which seemed wrong, since EXPERT should not directly affect anything except the availability of other options. (And EXPERT definitely shouldn't mean "implicitly turn off default safety features".)Quoted 6 lines
Change it to default to y, which means that turning on EXPERT does not automatically disable it, but will provide the option to disable it.
Signed-off-by Josh Triplett <[email protected]>No, Nacked actually. I'm fine with the v2 that only changed the EXPERT config to imply
DEBUG_KERNEL. But all the other changes here need to be revised, as I outlined in the thread.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Fixed in v4; please replace the patch in tip with that.
i applied the much simpler v2 twoliner version instead.
OK...
So, should I prepare a separate patch which changes the instances of
DEBUG_KERNEL&& EXPERT, or just leave them?
Yeah, would be nice to send a separate patch for that - 'DEBUG_KERNEL && EXPERT' is equivalent to EXPERT now, right?
Thanks,
Ingo