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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023102428-zit-quickness-9b73@gregkh>
Date:   Tue, 24 Oct 2023 17:45:40 +0200
From:   "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     "Li, Meng" <Meng.Li@...driver.com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "usb-storage@...ts.one-eyed-alien.net" 
        <usb-storage@...ts.one-eyed-alien.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: storage: add shutdown function for usb storage
 driver

On Tue, Oct 24, 2023 at 11:35:19AM -0400, Alan Stern wrote:
> On Tue, Oct 24, 2023 at 03:43:56AM +0000, Li, Meng wrote:
> > 
> > 
> > > -----Original Message-----
> > > From: Alan Stern <stern@...land.harvard.edu>
> 
> > > On Mon, Oct 23, 2023 at 01:41:11PM +0800, Meng Li wrote:
> > > > On ls1043/ls1046 rdb platform, if a PCIe-USB host controller is
> > > > installed, and an USB disk is also installed on the PCIe card, when
> > > > executing "reboot -f" to reset the board, there will be below error reported:
> > > > usb 2-2: device not accepting address 2, error -108
> 
> > > > This issue is introduced by linux-yocto commit 837547b64a34("driver: net:
> > > > dpaa: release resource when executing kexec") that cause to spend more
> > > > time on shutdown operation. So, the 2 platforms with DPAA are not
> > > > reset immediately after executing force reboot command. Moreover, the
> > > > usb-storage thread is still in active status, there is still control
> > > > data transferred between USB disk and PCIe host controller. But now
> > > > the shutdown callback of usb pci driver had been invoked to stop the
> > > > PCIe host controller completely. In this situation, the data transferring failed
> > > and report error.
> > > 
> > > That's _supposed_ to happen.  By design, the "reboot -f" command is meant
> > > to carry out an immediate reboot, without using the init system, unmounting
> > > filesystems, or doing other cleanup operations.
> > > 
> > 
> > As my above said, I understand what you mean. I also thought over what you said.
> > I am not sure, but I still sent patch to upstream community, and want to get some suggest from more authoritative maintainer.
> > 
> > > If you want a clean reboot with no errors, don't use the "-f" option.
> > > 
> > 
> > There is also error report even if I use command "reboot"
> 
> Okay, that's a different matter.  In fact, I don't know what is supposed 
> to happen during a clean reboot.

Define "clean" :)

reboot is a system thing that happens before the reboot syscall happens.
So which are we talking nabout here?

> Greg, do you know?  Should we take the time to disconnect all the USB 
> devices during a system shutdown?

In the past we have not.  And if we switch to do so, we might get some
complaints as we would now delaying the shutdown process to be longer
than before.

> What happens with non-USB disk drives?  Or other removable devices?

It would have to come from "above" in the device tree, so does the PCI
or platform bus say that they should be shut down and their child
devices?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ