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: <af0e1bc5-d08d-4b66-9a0b-4c39f17a043b@rowland.harvard.edu>
Date: Tue, 30 Dec 2025 11:23:40 -0500
From: Alan Stern <stern@...land.harvard.edu>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Huacai Chen <chenhuacai@...ngson.cn>,
	Huacai Chen <chenhuacai@...nel.org>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Shengwen Xiao <atzlinux@...a.com>
Subject: Re: [PATCH] USB: OHCI/UHCI: Add soft dependencies on ehci_hcd

On Tue, Dec 30, 2025 at 09:15:36AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Dec 30, 2025 at 04:00:14PM +0800, Huacai Chen wrote:
> > Commit 9beeee6584b9aa4f ("USB: EHCI: log a warning if ehci-hcd is not
> > loaded first") said that ehci-hcd should be loaded before ohci-hcd and
> > uhci-hcd. However, commit 05c92da0c52494ca ("usb: ohci/uhci - add soft
> > dependencies on ehci_pci") only makes ohci-pci/uhci-pci depend on ehci-
> > pci, which is not enough and we may still see the warnings in boot log.
> > So fix it by also making ohci-hcd/uhci-hcd depend on ehci-hcd.
> > 
> > Cc: stable@...r.kernel.org
> > Reported-by: Shengwen Xiao <atzlinux@...a.com>
> > Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> > ---
> >  drivers/usb/host/ohci-hcd.c | 1 +
> >  drivers/usb/host/uhci-hcd.c | 1 +
> >  2 files changed, 2 insertions(+)
> > 
> > diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> > index 9c7f3008646e..549c965b7fbe 100644
> > --- a/drivers/usb/host/ohci-hcd.c
> > +++ b/drivers/usb/host/ohci-hcd.c
> > @@ -1355,4 +1355,5 @@ static void __exit ohci_hcd_mod_exit(void)
> >  	clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
> >  }
> >  module_exit(ohci_hcd_mod_exit);
> > +MODULE_SOFTDEP("pre: ehci_hcd");
> 
> Ick, no, this way lies madness.  I hate the "softdep" stuff, it's
> usually a sign that something is wrong elsewhere.
> 
> And don't add this _just_ to fix a warning message in a boot log, if you
> don't like that message, then build the module into your kernel, right?
> 
> And I really should just go revert 05c92da0c524 ("usb: ohci/uhci - add
> soft dependencies on ehci_pci") as well, that feels wrong too.

This might also be a good time to revert 9beeee6584b9 ("USB: EHCI: log a 
warning if ehci-hcd is not loaded first").  Firstly, because it doesn't 
test the right condition; what matters is not whether ehci-hcd is loaded 
before uhci-hcd and ohci-hcd, but whether ehci-pci is loaded before 
uhci-pci and ohci-pci.

And secondly, because if the warning hasn't convinced people to fix the 
order of module loading after seventeen years, it's not likely to do so 
in the future.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ