From: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
To: Dirk Hohndel <hohndel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
Sarah Sharp
<sarah.a.sharp-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Matthew Dharm
<mdharm-usb-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org>,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: strange USB storage failure with 2.6.29-rc2
Date: Wed, 28 Jan 2009 17:59:11 +0000 [thread overview]
Message-ID: <1233165551.3236.99.camel@localhost.localdomain> (raw)
In-Reply-To: <20090128091406.316a80fc-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
On Wed, 2009-01-28 at 09:14 -0800, Dirk Hohndel wrote:
> On Wed, 28 Jan 2009 11:54:39 -0500 (EST)
> Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org> wrote:
>
> > > > So the real question is: Who is responsible for sending that Eject
> > > > command? It certainly isn't usb-storage or any other part of the USB
> > > > stack. Maybe something in the SCSI disk driver or maybe a user
> > > > program.
> > >
> > > That's one valid question... maybe someone on the linux-scsi list can
> > > sched some light onto this? Are there SCSI specific debugging options I
> > > should turn on?
> >
> > I don't see anything in the sd driver that could have done it. And I
> > don't know where else in the kernel it would have come from -- which is
> > not to say that I'm familiar with every part of the kernel!
>
> I did some greping and couldn't find anything suspicious, either.
>
> > > The other one is "why isn't the USB stack filtering that command when
> > > it comes down from SCSI?"
> >
> > The USB stack doesn't do any filtering. The SCSI stack is supposed to
> > know what commands should and should not be sent.
> >
> > Furthermore, it seems quite likely this command was sent by userspace,
> > not by the SCSI stack -- in which case the program is supposed to know
> > what commands it shouldn't send.
>
> Not sure I agree with that logic. If the USB stack KNOWS that
> non-removable devices get upset by this command, then it would be
> appropriate for it to filter those out - to protect from bugs as much
> as to protect from denial of service attacks.
Well, I really don't think we want to get into vetting SCSI commands
over SG_IO ... that would just trip us up on the enterprise (and
probably never work anyway).
The problem is that hal wants to send its own SCSI commands over SG_IO.
We've spent years trying to persuade it to put the crackpipe down and
back away from the window ledge on this (because SCSI in the kernel
knows better how to handle problem devices). We have been having some
limited success recently ... we keep enhancing what sysfs provides
(safely) so that hal doesn't have to poke in with SG_IO unsafely.
If you can find out what the actual reason hal or whatever is doing
this, we can have another go at them.
James
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-01-28 17:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090127122641.1564fc46@infradead.org>
[not found] ` <Pine.LNX.4.44L0.0901271548370.2286-100000@iolanthe.rowland.org>
[not found] ` <Pine.LNX.4.44L0.0901271548370.2286-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2009-01-28 4:06 ` strange USB storage failure with 2.6.29-rc2 Dirk Hohndel
[not found] ` <20090127200607.369a1693-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2009-01-28 16:54 ` Alan Stern
2009-01-28 17:14 ` Dirk Hohndel
2009-01-28 17:47 ` Alan Stern
2009-01-28 19:59 ` Dirk Hohndel
2009-01-28 20:14 ` Alan Stern
[not found] ` <20090128091406.316a80fc-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2009-01-28 17:59 ` James Bottomley [this message]
2009-01-28 20:01 ` Dirk Hohndel
2009-01-28 21:13 ` Pete Zaitcev
2009-01-28 21:23 ` Alan Stern
2009-01-28 21:29 ` Pete Zaitcev
[not found] ` <20090128142915.3b6f1949.zaitcev-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-28 21:41 ` Alan Stern
2009-01-28 21:49 ` Oliver Neukum
[not found] ` <Pine.LNX.4.44L0.0901281622210.2231-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2009-01-28 22:39 ` Dirk Hohndel
2009-01-28 21:10 ` Pete Zaitcev
[not found] ` <20090128141035.3a26ea60.zaitcev-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-28 21:21 ` Alan Stern
2009-01-28 21:22 ` Dirk Hohndel
[not found] ` <20090128132228.3f1e2f8a-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2009-01-28 21:27 ` Pete Zaitcev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233165551.3236.99.camel@localhost.localdomain \
--to=james.bottomley-d9phhud1jfjcxq6kfmz53/egyhegw8jk@public.gmane.org \
--cc=hohndel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mdharm-usb-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org \
--cc=sarah.a.sharp-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox