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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Nov 2007 09:15:08 -0800
From:	Matthew Dharm <mdharm-kernel@...-eyed-alien.net>
To:	Gabriel C <nix.or.die@...glemail.com>
Cc:	Greg KH <greg@...ah.com>, Alan Stern <stern@...land.harvard.edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, bk@...e.de, khali@...ux-fr.org,
	Boaz Harrosh <bharrosh@...asas.com>,
	James <James.Bottomley@...senPartnership.com>
Subject: Re: 2.6.24-rc2-mm1

On Wed, Nov 14, 2007 at 10:23:09AM +0100, Gabriel C wrote:
> Matthew Dharm wrote:
> > On Wed, Nov 14, 2007 at 06:33:39AM +0100, Gabriel C wrote:
> >> Matthew Dharm wrote:
> >>> On Tue, Nov 13, 2007 at 07:49:24PM -0800, Greg KH wrote:
> >>>> Matt, are these the errors you were worried about with the patch we were
> >>>> just talking about tha tis in my tree?
> >>> I can't tell from these logs.
> >> There is the dmesg with CONFIG_USB_STORAGE_DEBUG :
> >>
> >> http://194.231.229.228/dmesg-2.6.24-rc2-mm1
> > 
> > Good news: This isn't the bug Greg was worried about.
> > 
> > Bad news: Something is seriously strange here.  Note the following from the
> > logs:
> > 
> > Nov 14 06:07:43 lara [   41.890614] usb-storage: Bulk Status S 0x53425355 T 0xd R 0 Stat 0x0
> > Nov 14 06:07:43 lara [   41.890616] usb-storage: -- unexpectedly short transfer
> > 
> > Note the 'R' value of zero -- this is the residue value.  It indicates a
> > complete transfer, and that matches the log lines immediately previous
> > which indicate a 4K transfer which completed properly.
> > 
> > If residue is zero, then srb->resid should be zero.  Take a look in
> > linux/usb/storage/transport.c in usb_stor_Bulk_transport()
> > 
> > If srb->resid is zero, then you should NEVER get the "unexpectedly short
> > transfer" message.  Look at usb_stor_invoke_transport() in the same file.
> 
> That code got replaced recently but I have no idea about it.
> 
> ( http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=shortlog  see the patches from Boaz Harrosh) 
> 
> srb->resid got replaced by scsi_get_resid() it I see that right.
> 
> I'm CC'ing the author , he will know I think.

The replacement looks, to my eye, to be logically correct.  The patch was
pretty clean.

Then again, I haven't looked at what is "under the hood" of the accessor
functions.  Perhaps there is a side-effect somewhere in there?

Perhaps a quick debugging test -- print the value of scsi_get_resid(srb)
just after it's initialized to zero at the top of
usb_stor_invoke_transport(), and then just after the call to
us->transport().

The first print should show a value of zero.  The debug log says that the
transport should have left it as zero.  If it's actually coming back from
us->transport() as a non-zero value, then we'll need to check all the
modifications to usb_stor_Bulk_transport to see where srb->resid is being
changed.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@...-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

A:  The most ironic oxymoron wins ...
DP: "Microsoft Works"
A:  Uh, okay, you win.
					-- A.J. & Dust Puppy
User Friendly, 1/18/1998

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ