From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Jarod Wilson" <jarod@redhat.com>,
linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
"Kristian Høgsberg" <krh@bitplanet.net>
Subject: Re: [PATCH RFT 7/7] firewire: sbp2: add workarounds for 2nd and 3rd generation iPods
Date: Thu, 29 Jan 2009 22:28:57 +0100 [thread overview]
Message-ID: <49821F99.4070108@s5r6.in-berlin.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0901291536020.2394-100000@iolanthe.rowland.org>
Alan Stern wrote:
> On Thu, 29 Jan 2009, Stefan Richter wrote:
>> Obviously they changed something in Ubuntu 8.10 which suddenly made 3rd
>> gen iPods vulnerable too. If the report is accurate, then this is /not/
>> the READ CAPACITY 10 issue where device's capacity report is off by one.
>> (The reported capacity without workaround is an even number and thus
>> possibly correct.)
>
> Don't make that assumption. One of the small number of devices which
> really did have an odd number of sectors was an early iPod.
Ah, interesting.
(Jarod, didn't you see OS X report the same size on that 3rd gen. iPod
as Linux without quirk flag, or did I dream this? In any case this
could of course simply mean that OS X uses a wrongly reported size...)
>> Rather, this is apparently the kind of the bug where
>> an access which includes the last sector corrupts some state in the
>> firmware, causing the firmware to error out on subsequent accesses. The
>> actual IO errors in the reporter's log happen at low LBAs, not at LBAs
>> at the end.
>
> Are you aware of the last_sector_bug flag? It prevents sectors near
> the end of the device from being accessed using anything other than
> single-sector reads or writes. Some devices don't like it if, for
> example, you do a 2-sector read that includes the last sector.
Now that you mention it I do remember. I would need to ask the reporter
of the Ubuntu bug who has a fully working 3rd gen iPod (unlike Jarod's
3rd gen iPod which doesn't work reliably anymore) to compile a kernel
from patched sources if I really wanted to investigate whether the
last_sector_bug flag fixes the issue too. The fix_capacity flag can be
easily enabled for FireWire disks by users of binary kernel packages at
runtime, so that's what I had the reporter try.
Hmm, I'm beginning to suspect that I should duplicate usb-storage's
if (sdev->type == TYPE_DISK)
sdev->last_sector_bug = 1;
into the FireWire drivers. There aren't any fundamental downsides to
this, are there?
>> Now, what does OS X do with those iPods? I don't know. Maybe they have
>> quirks lists like we do. There could be something to be found in the
>> Darwin sources. But I consider it more likely that OS X simply does not
>> do the kind of accesses that Linux does which tend to crash all those
>> crap firmwares left and right.
>>
>> Evidently, at least popular Windows incarnations don't do such accesses,
>> at least not in normal usage. Otherwise this class of firmware bugs
>> could simply not exist in mass market devices.
>
> Linux uses the last-sector accesses to check whether or not the device
> is part of a RAID. Apparently Windows and OS X don't support the kinds
> of RAID that need this.
Or they don't support these kinds of RAID over certain transports like
USB and FireWire...?
--
Stefan Richter
-=====-==--= ---= ===-=
http://arcgraph.de/sr/
next prev parent reply other threads:[~2009-01-29 21:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-24 18:41 [PATCH 0/7] ieee1394 + firewire: misc sbp2 updates Stefan Richter
2009-01-24 18:42 ` [PATCH 1/7] firewire: sbp2: fix payload limit at S1600 and S3200 Stefan Richter
2009-01-24 18:42 ` [PATCH 2/7] firewire: sbp2: define some magic numbers as macros Stefan Richter
2009-01-24 18:43 ` [PATCH 3/7] ieee1394: sbp2: fix payload limit at S1600 and S3200 Stefan Richter
2009-01-24 18:44 ` [PATCH 4/7] ieee1394: sbp2: don't assume zero model_id or firmware_revision if there is none Stefan Richter
2009-01-24 18:45 ` [PATCH 5/7] ieee1394: sbp2: follow up on "ieee1394: inherit ud vendor_id from node vendor_id" Stefan Richter
2009-01-24 18:45 ` [PATCH RFT 6/7] ieee1394: sbp2: add workarounds for 2nd and 3rd generation iPods Stefan Richter
2009-01-24 22:29 ` Stefan Richter
2009-01-24 18:46 ` [PATCH RFT 7/7] firewire: " Stefan Richter
2009-01-28 22:18 ` Jarod Wilson
2009-01-28 22:25 ` Jarod Wilson
2009-01-28 23:11 ` [PATCH revised] " Stefan Richter
2009-01-28 23:13 ` [PATCH revised] ieee1394: " Stefan Richter
2009-01-29 3:21 ` Jarod Wilson
2009-01-29 3:20 ` [PATCH revised] firewire: " Jarod Wilson
2009-01-28 23:11 ` [PATCH RFT 7/7] " Stefan Richter
2009-01-29 3:18 ` Jarod Wilson
2009-01-29 20:09 ` Stefan Richter
2009-01-29 20:40 ` Alan Stern
2009-01-29 21:28 ` Stefan Richter [this message]
2009-01-29 22:38 ` Alan Stern
2009-01-30 15:16 ` Jarod Wilson
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=49821F99.4070108@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=jarod@redhat.com \
--cc=krh@bitplanet.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stern@rowland.harvard.edu \
/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
all inboxes | Powered by JetHome®