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: <20120703203512.GE28804@parisc-linux.org>
Date:	Tue, 3 Jul 2012 14:35:12 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
Cc:	Alan Stern <stern@...land.harvard.edu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Hans de Goede <hdegoede@...hat.com>,
	Ben Hutchings <ben@...adent.org.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"alan@...rguk.ukuu.org.uk" <alan@...rguk.ukuu.org.uk>,
	Matthew Dharm <mdharm-usb@...-eyed-alien.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-scsi <linux-scsi@...r.kernel.org>
Subject: Re: [ 38/48] SCSI & usb-storage: add try_rc_10_first flag

On Wed, Jul 04, 2012 at 12:07:52AM +0400, James Bottomley wrote:
> > The reason for the try_rc_10_first flag is that some devices return
> > bogus data in response to RC16.  Like, an 800 GB device claiming to
> > have 3 exabytes.
> 
> So we could easily send both and only believe RC10 if the device is
> under 2TB.  However, what about all the extra flags we read out of RC16,
> like trim, large sector size and DIF capability?  If the device lies
> about its capacity, won't we get bogus values for those as well, which
> is going to cause other screw ups?

I think the necessary algorithm is simpler than that:

Send RC10 (unless the device supports PI, in which case it's probably
	enterprisey and well-tested)
Send RC16
If RC10 capacity agrees with RC16 capacity, use extra RC16 data.
(for values of "agrees with" that include the "-1 to use RC16" indicator)

Sure, it's one extra command, but really, who cares?

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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