Re: 2.6.8.1 Mis-detect CRDW as CDROM

From: Christer Weinigel
Date: Tue Aug 17 2004 - 07:01:12 EST


Following up to myself...

Christer Weinigel <christer@xxxxxxxxxxx> writes:

> Some commands are a bit questionable though, for example, should it be
> possible to use GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL with only read
> permissions?
>
> The MODE_SELECT command I belive is needed for read on some tape
> drives because tape parameters such as compression and tape density
> are configured this way. But there might be a device where a
> MODE_SELECT on a vendor configuration page might destroy the device,
> so it might not be such a good idea to allow MODE_SELECT and in that
> case I don't know how it should be handled.

I just did a quick google search on "MODE SELECT" and "vendor" and
found the following documentation for an IBM DeskStar driver:

http://www.embeddedlogic.com/TH99/h/txt/1478.txt

Page 0
Vendor Unique Parameters
UQE - Untagged Queuing Enable (1)
DWD - Disable Write Disconnect (0)
UAI - Unit Attention Inhibit (0)
CPE - Concurrent Processing Enable (1)
TCC - Thermal Compensation (0)
DSN Disable Target Initiated Synchronous Negotiation (0)
FRDD Format Degraded (1)
DRD - Disable Read Disconnect (1)

Allowing a user who is only supposed to have write access to a raw
partition to disable read or write disconnect does not seem like such
a hot idea, so MODE SELECT should probably be disallowed unless
someone writes a verify function that looks for safe bits in the
page.

This could get a bit painful.

/Christer

--
"Just how much can I get away with and still go to heaven?"

Freelance consultant specializing in device driver programming for Linux
Christer Weinigel <christer@xxxxxxxxxxx> http://www.weinigel.se
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/