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-next>] [day] [month] [year] [list]
Date:   Tue, 30 Oct 2018 08:28:09 +0000
From:   "Zengtao (B)" <prime.zeng@...ilicon.com>
To:     "jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "stern@...land.harvard.edu" <stern@...land.harvard.edu>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "usb-storage@...ts.one-eyed-alien.net" 
        <usb-storage@...ts.one-eyed-alien.net>
Subject: scsi_set_medium_removal timeout issue 

Hi 

I have recently met a scsi_set_medium_removal timeout issue, and it's related
 to both SCSI and USB MASS storage. 
Since i am not an expert in either scsi or usb mass storage, i am writing to report
the issue and ask for a solution from you guys.

My test scenario is as follow:
1.Linux HOST-----Linux mass storage gadget(the back store is a flash partition).
2.Host mount the device.
3.Host writes some data to the Mass storage device.
4.Host Unmount the device.
Both Linux kernels(Host and Device) are Linux 4.9.  
Some has reported the same issue a long time ago, but it remains there.
https://www.spinics.net/lists/linux-usb/msg53739.html

For the issue itself, there is my observation:
In the step 4, the Host will issue an PREVENT_ALLOW_MEDIUM_REMOVAL scsi command.
and and timeout happens due to the device 's very slow fsg_lun_fsync_sub.
I found there are two methods to workaround the issue: 
1. Change the timeout value of host scsi command PREVENT_ALLOW_MEDIUM_REMOVAL to
to about 60 seconds from 10 seconds.
2. Remove the fsg_lun_fsync_sub in the device's Mass storage gadget driver.

Thanks

Regards
zentao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ