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]
Message-ID: <4729F996.4030701@gmail.com>
Date:	Fri, 02 Nov 2007 01:06:46 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	Daniel Drake <dsd@...too.org>, Jeff Garzik <jeff@...zik.org>,
	Jens Axboe <jens.axboe@...cle.com>,
	linux list <linux-kernel@...r.kernel.org>,
	linux-ide@...r.kernel.org, Albert Lee <albertcc@...ibm.com>
Subject: Re: "Fix ATAPI transfer lengths" causes CD writing regression

Alan Cox wrote:
>> "one size" that you can supply to the SG_IO command (unless you want to 
>> use a stupidly large buffer) to retrieve all the data at once. Instead, 
>> as Tejun describes, you put a short read request in first, look at byte 
>> 1 of the page which tells you the length, and then read the whole lot.
> 
> ATAPI effectively requires you supply a stupidly large buffer. In theory
> you set the transfer size in the lba registers and it all works. In
> practice some drives ignore this and there isn't a nice reliable way to
> clean up.

The transfer size is specified in Allocation Length field inside CDB of
commands which can transfer variable length data.  I got confused about
this too but both the host and device know how much data can be transferred.

> Welcome to the wonderful world of IDE, where the spec sucks and the
> drives manage to do even worse things.
> 
> We can try and clean up better in these cases at least for PIO transfers
> by trying to drain the data beyond this point, on the controllers that
> cope with this but really - fix the app to reflect reality: ATAPI is SCSI
> as spoken by yokels

Not that I disagree to this point tho.  :-)

-- 
tejun
-
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