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: <2023060137-nuzzle-cadet-6fd4@gregkh>
Date:   Thu, 1 Jun 2023 16:45:14 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Tony Lindgren <tony@...mide.com>
Cc:     Jiri Slaby <jirislaby@...nel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Andy Shevchenko <andriy.shevchenko@...el.com>,
        Dhruva Gole <d-gole@...com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        John Ogness <john.ogness@...utronix.de>,
        Johan Hovold <johan@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-omap@...r.kernel.org,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: core: Fix probing serial_base_bus devices

On Thu, Jun 01, 2023 at 06:07:06PM +0300, Tony Lindgren wrote:
> * Greg Kroah-Hartman <gregkh@...uxfoundation.org> [230601 14:21]:
> > On Thu, Jun 01, 2023 at 05:14:44PM +0300, Tony Lindgren wrote:
> > > If a physical serial port device driver uses arch_initcall() we fail to
> > > probe the serial_base_bus devices and the serial port tx fails. This is
> > > because as serial_base_bus uses module_initcall().
> > > 
> > > Let's fix the issue by changing serial_base_bus to use arch_initcall().
> > 
> > This will only work if the linking order is such that this will always
> > come before the drivers.  Is that the case here?
> 
> I guess based on Makefile. And also if serial drivers are modules as we
> export uart_add_one_port() from serial_base.ko. But yeah this is pretty
> fragile potentially.

It's fine, and normal, the Makefile is the ordering here so all is good.

> Hmm maybe we could keep module_init() and then also call serial_base_init()
> on uart_add_one_port() path if not yet initialized?
> 
> Probably the module_init() should be still there for case when no serial
> port device drivers are loaded and serial_base is unloaded..

I'll leave this as-is, it looks correct, and I'll queue it up now,
thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ