Re: [PATCH] Unhide DEBUG_RODATA if EXPERT, even if DEBUG_KERNEL=n

From: Ingo Molnar
Date: Sun Jun 05 2011 - 05:38:20 EST



* Josh Triplett <josh@xxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/