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: <20231208082832.GV5169@atomide.com>
Date:   Fri, 8 Dec 2023 10:28:32 +0200
From:   Tony Lindgren <tony@...mide.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>,
        Sergey Senozhatsky <senozhatsky@...omium.org>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Andy Shevchenko <andriy.shevchenko@...el.com>,
        Dhruva Gole <d-gole@...com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Johan Hovold <johan@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH v4 0/4] Add support for DEVNAME:0.0 style hardware based
 addressing

* Tony Lindgren <tony@...mide.com> [700101 02:00]:
> * Tony Lindgren <tony@...mide.com> [700101 02:00]:
> > We also prepare the serial core to handle the ttyS related quirks done
> > in console_setup() to prepare things for eventually dropping the parsing
> > from console_setup(). This can only happen after further changes to
> > register_console().
> 
> Petr FYI, so for dropping the console_setup() parsing, below is a hack
> patch to see what goes wrong in register_console() if you have some ideas
> on how to handle this.
> 
> We end up with the console device backed up seria8250 instead of ttyS0,
> and earlycon won't get properly disabled. And of course other consoles
> beyond ttyS need to be also considered.

Hmm so the following extra patch seems to fix the issues based on light
testing. But is it safe to assume that if CON_PRINTBUFFER is set we can
disable the bootconsole?

I also noticed that the bootconsole not getting disabled issue is there
also for console=DEVNAME:0.0 usage even before we start dropping handling
in console_setup().

Regards,

Tony

8< ----------------------
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3549,7 +3549,8 @@ void register_console(struct console *newcon)
 	 */
 	con_printk(KERN_INFO, newcon, "enabled\n");
 	if (bootcon_registered &&
-	    ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) &&
+	    !(newcon->flags & CON_BOOT) &&
+	    (newcon->flags & (CON_CONSDEV | CON_PRINTBUFFER)) &&
 	    !keep_bootcon) {
 		struct hlist_node *tmp;
 
-- 
2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ