lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 6 Jun 2011 20:16:09 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	Sam Ravnborg <sam@...nborg.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3] Make CONFIG_EXPERT select CONFIG_DEBUG_KERNEL to
 unhide debug options

On Mon, Jun 06, 2011 at 09:51:30AM -0700, Josh Triplett wrote:
> 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.

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:

> 
> 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.
> 
> Signed-off-by: Josh Triplett <josh@...htriplett.org>
> ---
> 
> 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(-)
> 
> diff --git a/arch/tile/Kconfig.debug b/arch/tile/Kconfig.debug
> index ddbfc33..afc9cf3 100644
> --- a/arch/tile/Kconfig.debug
> +++ b/arch/tile/Kconfig.debug
> @@ -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.

>  	help
>  	  Write kernel log output directly via the hypervisor console.
> diff --git a/init/Kconfig b/init/Kconfig
> index ebafac4..14370d3 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -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
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index dd373c8..b121413 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ