* [PATCH] Unhide DEBUG_RODATA if EXPERT, even if DEBUG_KERNEL=n
@ 2011-06-05 8:37 Josh Triplett
2011-06-05 9:38 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Josh Triplett @ 2011-06-05 8:37 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, Sam Ravnborg, Andrew Morton,
Linus Torvalds, linux-kernel
CONFIG_DEBUG_RODATA defaults to y. Embedded systems might want to
disable this to save space; however, disabling it requires enabling
CONFIG_DEBUG_KERNEL to see it. Unhide it for CONFIG_EXPERT=y as well,
so it shows up as an option for embedded users without having to turn on
CONFIG_DEBUG_KERNEL.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
On a related note, I noticed while making this patch that
DEBUG_RODATA_TEST defaults to y, as of commit
72370f2a5b227bd3817593a6b15ea3f53f51dfcb; however, the description says
"If in doubt, say N". Should the default change, or should the
description? DEBUG_RODATA_TEST seems like the kind of thing that should
default to n.
arch/x86/Kconfig.debug | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index c0f8a5c..8653d8b 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -81,7 +81,7 @@ config X86_PTDUMP
config DEBUG_RODATA
bool "Write protect kernel read-only data structures"
default y
- depends on DEBUG_KERNEL
+ depends on DEBUG_KERNEL || EXPERT
---help---
Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const
--
1.7.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Unhide DEBUG_RODATA if EXPERT, even if DEBUG_KERNEL=n
2011-06-05 8:37 [PATCH] Unhide DEBUG_RODATA if EXPERT, even if DEBUG_KERNEL=n Josh Triplett
@ 2011-06-05 9:38 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2011-06-05 9:38 UTC (permalink / raw)
To: Josh Triplett
Cc: Thomas Gleixner, Sam Ravnborg, Andrew Morton, Linus Torvalds,
linux-kernel
* Josh Triplett <josh@joshtriplett.org> wrote:
> --- a/arch/x86/Kconfig.debug
> +++ b/arch/x86/Kconfig.debug
> @@ -81,7 +81,7 @@ config X86_PTDUMP
> config DEBUG_RODATA
> bool "Write protect kernel read-only data structures"
> default y
> - depends on DEBUG_KERNEL
> + depends on DEBUG_KERNEL || EXPERT
This is doing it the wrong way around. The right solution is what i
wrote for verbose-debug: if we select DEBUG_KERNEL from EXPERT then
you will avoid having to expand || EXPERT conditions into every
default-enabled debug facility ...
My suggested solution will be a lot easier to maintain as well as
under your scheme, because with your scheme we'd have to:
- add || EXPERT every time a debug facility is enabled by default
- remove || EXPERT every time a debug facility is switched to
off-by-default
If EXPERT selects DEBUG_KERNEL then we always get the right behavior,
without polluting debug Kconfig's with EXPERT logic ...
Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-05 9:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-05 8:37 [PATCH] Unhide DEBUG_RODATA if EXPERT, even if DEBUG_KERNEL=n Josh Triplett
2011-06-05 9:38 ` Ingo Molnar
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.