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]
Date:	Wed, 24 Aug 2011 17:23:08 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Hans de Goede <hdegoede@...hat.com>
cc:	Greg KH <greg@...ah.com>, USB list <linux-usb@...r.kernel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: RFC: Add USBDEVFS_TRY_DISCONNECT ioctl

On Wed, 24 Aug 2011, Hans de Goede wrote:

> Hi,
> 
> First of all: A big thanks to Alan for working on this. From my POV
> the code looks good, but I'm only familiar with the usb parts
> and not with the scsi parts.
> 
> One generic concern is the use of scsi_lock(host) in the
> scsi_device_open / close callbacks. We need to be sure non
> of the callers of these can already be holding the lock.

The callers always runs in process context (because file open/close
always uses process context) and the lock is a spinlock.  So no, the
lock can't be held at the wrong time.


> On 08/24/2011 10:45 PM, Greg KH wrote:

> > I don't like the fact that if a driver doesn't contain check_busy() then
> > it will automatically fall back to looking like it was a DISCONNECT
> > call, which could give userspace a false sense of "everything was fine"
> > when trying this out.
> 
> I've to agree with Greg here, what to do in case of a driver not
> implementing check_busy and thus not really offering USBDEVFS_TRY_DISCONNECT
> is policy and thus should be left to userspace. I suggest we just return
> -ENOTTY in case of USBDEVFS_TRY_DISCONNECT and the bound driver does not
> have checkbusy, then userspace can decide wether to fallback to a regular
> disconnect, or to give up.

Okay, I'll change the patch.  But the real question is whether the 
basic idea is acceptable.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ