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]
Message-ID: <74ac4f63-2a5f-5b0c-a2d3-4758c264b137@roeck-us.net>
Date:   Thu, 22 Oct 2020 07:23:00 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Shreyas Joshi <shreyas.joshi@...mp.com>,
        shreyasjoshi15@...il.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: RFC 2/2] printk: Restore and document obsolete ways to disable
 console output

On 10/22/20 4:42 AM, Petr Mladek wrote:
> The commit 48021f98130880dd7 ("printk: handle blank console arguments
> passed in.") prevented crash caused by empty console= parameter value.
> 
> Unfortunately, this value is widely used on Chromebooks to disable
> the console output. The above commit caused performance regression
> because the messages were pushed on slow console even though nobody
> was watching it.
> 
> "mute_console" kernel parameter has been introduced as a proper and
> official was to disable console output. It avoids the performance
> problem by suppressing all kernel messages. Also avoids the crash
> by registering the default console.
> 
> Make console="" behave the same as "mute_console" to avoid
> the performance regression on existing Chromebooks.
> 
> Do the same also for console=null which seem to be another widely
> suggested and non-official way to disable the console output.
> 
> Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> Signed-off-by: Petr Mladek <pmladek@...e.com>
> ---
>  Documentation/admin-guide/kernel-parameters.txt | 5 +++++
>  kernel/printk/printk.c                          | 9 ++++++++-
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 52b9e7f5468d..14472f674a89 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -670,11 +670,16 @@
>  		hvc<n>	Use the hypervisor console device <n>. This is for
>  			both Xen and PowerPC hypervisors.
>  
> +		null
> +		""	Obsolete way to disable console output. Please,
> +			use "mute_console" instead.
> +
>  		If the device connected to the port is not a TTY but a braille
>  		device, prepend "brl," before the device type, for instance
>  			console=brl,ttyS0
>  		For now, only VisioBraille is supported.
>  
> +

stray whitespace change

>  	console_msg_format=
>  			[KNL] Change console messages format
>  		default
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 63fb96630767..08c50d8ba110 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2208,8 +2208,15 @@ static int __init console_setup(char *str)
>  	char *s, *options, *brl_options = NULL;
>  	int idx;
>  
> -	if (str[0] == 0)
> +	/*
> +	 * console="" or console=null have been suggested as a way to
> +	 * disable console output. It worked just by chance and was not
> +	 * reliable. It has been obsoleted by "mute_console" parameter.
> +	 */
> +	if (str[0] == 0 || strcmp(str, "null") == 0) {
> +		mute_console = true;
>  		return 1;
> +	}
>  
>  	if (_braille_console_setup(&str, &brl_options))
>  		return 1;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ