From: Al Viro <viro@ftp.linux.org.uk>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux-scsi@vger.kernel.org, linux1394-devel@lists.sourceforge.net
Subject: Re: TYPE_RBC cache fixes (sbp2.c affected)
Date: Mon, 20 Feb 2006 06:08:45 +0000 [thread overview]
Message-ID: <20060220060845.GS27946@ftp.linux.org.uk> (raw)
In-Reply-To: <43EDB35F.40709@s5r6.in-berlin.de>
On Sat, Feb 11, 2006 at 10:50:23AM +0100, Stefan Richter wrote:
> Yes, I will do so as soon I got spare time.
> MODE_SENSE_10 seemed to be the trigger, as mentioned in
> http://marc.theaimsgroup.com/?l=linux-scsi&m=112128914912105 . Also note
> that this device reports to implement Direct-Access, unlike most other
> SBP-2 HDDs which pose as Direct-Access-RBC.
OK, I think I've seen one that does it. Behold the lossage:
* bugger does, indeed, report itself to be type 0
* OK, says sd_read_cache_type(). Page 8 for you, then.
* so called "SCSI device" spits out...
<drumroll> RBC page 6. Sans mode page headers.
So we see 0x86 0x0b where the data length should've been. And bytes 3 and 2
of device size where the block descriptors size should've been. Since sd.c
doesn't expect that level of idiocy (it should, but...) we adjust length
down from ~34000 to 20 _and_ blindly add block descriptors size. Or what
we assume to be one.
Then we proceed to call scsi_mode_sense() with buffer created by kmalloc(512,
GFP_DMA) and len... well, anywhere up to 64Kb. One of the first things it
does is memset(buffer, 0, len).
That's an Initio bridge, BTW. I suspect that the best we can do is to
blacklist the little shit with "don't trust that one, it's really type 14".
If it reacts to request for page 6 in a saner fashion, that is...
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
next prev parent reply other threads:[~2006-02-20 6:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-16 1:59 TYPE_RBC cache fixes (sbp2.c affected) Al Viro
2005-05-16 3:26 ` Douglas Gilbert
2005-05-16 4:18 ` Al Viro
2005-05-21 5:03 ` Douglas Gilbert
2005-05-21 15:01 ` James Bottomley
2005-05-21 15:38 ` Jeff Garzik
2005-05-21 16:00 ` James Bottomley
2005-05-21 16:22 ` Al Viro
2005-05-21 18:12 ` James Bottomley
2005-05-21 22:06 ` Douglas Gilbert
2005-05-22 5:08 ` Douglas Gilbert
2005-05-21 15:24 ` James Bottomley
2005-05-22 10:15 ` Douglas Gilbert
2005-05-22 6:31 ` Douglas Gilbert
2005-05-22 14:06 ` James Bottomley
2005-05-23 15:14 ` Douglas Gilbert
2006-02-08 23:39 ` Stefan Richter
2006-02-08 23:54 ` Al Viro
2006-02-11 9:50 ` Stefan Richter
2006-02-11 13:05 ` Al Viro
2006-02-13 20:40 ` Stefan Richter
2006-02-20 6:08 ` Al Viro [this message]
2006-02-21 19:56 ` Stefan Richter
2006-02-21 21:51 ` Al Viro
2006-02-21 22:41 ` Stefan Richter
2006-02-22 7:08 ` Stefan Richter
2006-02-22 7:16 ` Al Viro
2006-02-22 7:35 ` Stefan Richter
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=20060220060845.GS27946@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=linux-scsi@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.