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] [day] [month] [year] [list]
Date: Mon, 17 Jun 2024 10:03:14 +0200
From: Petr Mladek <pmladek@...e.com>
To: Tony Lindgren <tony.lindgren@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jirislaby@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	John Ogness <john.ogness@...utronix.de>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Tony Lindgren <tony@...mide.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] printk: Add update_preferred_console()

On Mon 2024-06-17 10:20:57, Tony Lindgren wrote:
> On Fri, Jun 14, 2024 at 07:17:20PM +0200, Petr Mladek wrote:
> > On Thu 2024-06-13 15:51:08, Tony Lindgren wrote:
> > > The earlier attempt on doing this caused a regression with the kernel
> > > command line console order as it added calling __add_preferred_console()
> > > again later on during init. A better approach was suggested by Petr where
> > > we add the deferred console to the console_cmdline[] and update it later
> > > on when the console is ready.
> > 
> > > --- a/kernel/printk/printk.c
> > > +++ b/kernel/printk/printk.c
> > > @@ -2486,8 +2495,8 @@ __setup("console_msg_format=", console_msg_format_setup);
> > >   */
> > >  static int __init console_setup(char *str)
> > >  {
> > > -	char buf[sizeof(console_cmdline[0].name) + 4]; /* 4 for "ttyS" */
> > > -	char *s, *options, *brl_options = NULL;
> > 
> > I would add
> > 
> > 	static_assert(sizeof(console_cmdline[0].devname) >= sizeof(console_cmdline[0].name));
> 
> That check should still be >= sizeof(console_cmdline[0].name) + 4, right?
> For the "number only" consoles we add the "ttyS" prefix.

Right. Great catch!

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ