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: <20201007072853.GF32369@alley>
Date:   Wed, 7 Oct 2020 09:28:53 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:     Guenter Roeck <linux@...ck-us.net>,
        Shreyas Joshi <shreyas.joshi@...mp.com>, rostedt@...dmis.org,
        shreyasjoshi15@...il.com, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] printk: handle blank console arguments passed in.

On Wed 2020-10-07 02:15:04, Sergey Senozhatsky wrote:
> On (20/10/06 18:35), Petr Mladek wrote:
> > > > Whatever is decided, I'd like to have it made official and documented to
> > > > avoid a similar problem in the future.
> > 
> > Sigh, it is even bigger mess than I expected. There is a magic
> > variable "console_set_on_cmdline". It used, for example, in
> > of_console_check() to prevent using the default console from dts.
> 
> I wonder if we can do something like:
> 
> ---
> @@ -2200,6 +2200,9 @@ static int __init console_setup(char *str)
>         char *s, *options, *brl_options = NULL;
>         int idx;
>  
>         if (str[0] == 0) {
> +		console_set_on_cmdline = 1;

Unfortunately, this is not enough. We will also need to prevent
enabling the fallback console when has_preferred_console is not set.
The following might work:

		/*
		 * Dirty hack to prevent using any console with tty
		 * binding as a fallback and adding the empty
		 * name into console_cmdline array.
		 */
		preferred_console = MAX_CMDLINECONSOLES;

>                 return 1;
>  	}

It might be the minimal change that would fix the regression and keep
the original fix. But it would make the code even more hairy.

It might be acceptable as a hotfix. But we really should somehow clean
up the code and try to make the behavior more consistent.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ