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:	Sat, 10 Jan 2009 15:12:48 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
Cc:	Sergei Shtylyov <sshtylyov@...mvista.com>,
	Christian Borntraeger <borntraeger@...ibm.com>,
	linux-ide@...r.kernel.org, Jeff Garzik <jgarzik@...hat.com>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: todays git: WARNING: at drivers/ata/libata-sff.c:1017
 ata_sff_hsm_move+0x45e/0x750()

O> Your problem is that the *device* is wanting to transfer a set of bytes
> not divisible by four.  If you want to use word based PIO, you'll have
> to fall back to collecting bytes for the last two.  Alternatively, you

Nope.. you can't do that with ATA block transfers - it isn't the same as
SCSI

> could just do byte PIO for all reply lengths like this ... they occur
> all over the SCSI standard, but not usually in critical paths.

The problem we have is that the sg list the drivers were given had a
segment which was not divisible in length by four and was *NOT* the last
segment in the sg list

The logic in the ATA PIO code is basically


	for each sg entry

		compute the number of bytes to transfer staying within
the page
		transfer that many bytes (but may be more)

		if and only if the transfer is NOT the last segment but is
			more than the bytes requested - WARN


The block alignment is set to 4 bytes so the block code should be handing
down stuff which is safe. Some of the sense and other stuff is "adjusted"
by the libata-scsi conversion code which at this point I suspect is the
offender.

This is why libata uses the pad buffers we don't get to be quite so exact
about transfer sizes as SCSI is.

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