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: <538170.68988.qm@web31803.mail.mud.yahoo.com>
Date:	Mon, 22 Nov 2010 12:02:26 -0800 (PST)
From:	Luben Tuikov <ltuikov@...oo.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-usb@...r.kernel.org, Greg KH <greg@...ah.com>,
	James Bottomley <James.Bottomley@...e.de>
Subject: Re: [PATCH repost 3] [SCSI] Retrieve the Caching mode page

--- On Mon, 11/22/10, Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> > Some kernel transport drivers unconditionally disable
> > retrieval of the Caching mode page. One such for
> example is
> > the BBB/CBI transport over USB.
> 
> One reason for that is that historically we've seen devices
> that
> simply go crazy - to the point of simply stopping to
> respond to
> anything - when you ask for pages that Windows doesn't ask
> for.
> 
> It's especially common on USB storage, but it happens
> elsewhere too.
> The device firmware simply hasn't ever been tested in that
> situation,
> and it's buggy.
> 
> So I don't mind the patch per se, but I think it's
> potentially way
> more dangerous than it looks.

This patch does not ask for pages that Windows doesn't ask for. The sd driver already asks for all pages (page code 0x3F) and then checks if the device is write protected. Here is the present code:

  2217                  sd_read_write_protect_flag(sdkp, buffer);
  2218                  sd_read_cache_type(sdkp, buffer);
  2219                  sd_read_app_tag_own(sdkp, buffer);

Line 2217 asks for page code 0x3F, meaning all mode pages.
Line 2218 asks for the Caching mode page or not at all if the device flags forbid it (all USB storage devices in the Linux kernel).

This patch adds processing of the data returned when all mode pages are asked for (0x3F) in the function on line 2218. It then parses the data to find out if the Caching mode page is present.

   Luben

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