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: <1a5d9e02-856c-8e2d-4eae-cb5a1b5c4652@gmx.de>
Date:   Sun, 23 Jan 2022 14:07:24 +0100
From:   Helge Deller <deller@....de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-usb@...r.kernel.org,
        Linux Kernel Development <linux-kernel@...r.kernel.org>
Subject: Re: kernel crash/disc errors when unbinding USB devices

On 1/23/22 13:33, Greg Kroah-Hartman wrote:
> On Sun, Jan 23, 2022 at 12:59:21PM +0100, Helge Deller wrote:
>> On 1/23/22 12:07, Greg Kroah-Hartman wrote:
>>> On Sun, Jan 23, 2022 at 11:40:01AM +0100, Helge Deller wrote:
>>>> On all kernels 5.15.x and 5.16.x I noticed that resetting
>>>> the USB devices with this shell script:
>>>>
>>>>        for i in $(ls /sys/bus/pci/drivers/ahci/|grep :)
>>>>          do
>>>>          echo $i
>>>>          echo $i >/sys/bus/pci/drivers/ahci/unbind
>>>>          sleep 1
>>>>          echo $i >/sys/bus/pci/drivers/ahci/bind
>>>>         done
>>>
>>> That is dangerous to do, why do this?  All of your block devices might
>>> have disappeard.
>>>
>>>>         # reseting USB3 ports (if there none you'll get errors)
>>>>         for i in $(ls /sys/bus/pci/drivers/xhci_hcd/|grep :)
>>>>          do
>>>>          echo $i
>>>>          echo $i >/sys/bus/pci/drivers/xhci_hcd/unbind
>>>>          sleep 1
>>>>          echo $i >/sys/bus/pci/drivers/xhci_hcd/bind
>>>>         done
>>>
>>> Again, why do this at all?
>>
>> I need to reset some of the USB devices after a suspend/resume cycle.
>
> The devices, or the host controllers?  They are different things.
>
>> The problem is, that some of the USB devices are
>> handed over into a running VirtualBox VM and after
>> the suspend/resume they need to be virtually plugged out/in
>> so that the running Windows VM will reconnect them.
>
> unbind/bind is a very harsh way of doing this.  but do it on the USB
> devics, not the host controllers.
>
>> If you search in the internet, you will find many places
>> where this unbind/bind process is mentioned, e.g.:
>> https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line
>> This procedure did worked in the past.
>
> Never trust the internet :)
>
> But note, there is a usbreset program mentioned there, which is part of
> 'usbutils' and should already be installed on your machine.  Why not
> just use that?
>
>> I think the main problem is, that it's somehow unexpected that
>> the SATA controllers are logically attached to the USB
>> controllers.
>
> Huh?  No they are not.
>
> 'ahci' is a SATA controller.
> 'xhci' is a USB controller.
>
> Two totally different things.

Right, and that was my fault.
I mixed up "ahci" and "ehci" (the USB2.0 controller).

So, my report was bogus.
Please ignore.

Helge

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ