Re: [RFC] list of SCSI commands
From: Andreas Messer
Date: Tue Aug 17 2004 - 12:59:11 EST
Hello,
On Tue, Aug 17, 2004 at 07:27:48PM +0200, Marc Ballarin wrote:
> Hi,
> I think the filtering mechanism needs to be refined before we can do
> useful patches. I think it will be necessary to base filtering on
> scsi_type from struct sg_scsi_id (in sg.h and scsi.h). Otherwise it will
> be impossible to get functionality and safety for all devices.
Yes, but some people want to use 2.6.8.1 instead of 2.6.7 (NFS security
problem) and i only want to provide a short patch to get the old behavior.
Like You, i think there should be device-class depend accesscontrol-lists.
But this will need more performance. As there are not that many device
classes, i would suggest to make one verify-function per device class and
put a pointer in the file-struct, which will point to the suggested function
>
> I have compiled a long list of various SCSI commands and tried to
> categorize them. This list is focused on mmc devices (CD-RW, DVD+R).
> Many commands that are only relevant for discs are not included.
>
> =UNCLEAR=
> MODE SELECT should be safe for mmc devices (sometimes even required).
> However, it often is *not* safe for other devices. This is a case,
> were filtering needs to honor device types.
> 0x15 MODE_SELECT
> 0x55 MODE_SELECT_10
> 0x01 REZERO_UNIT
Yes, this is really a problem.
> I haven't found further information on the following commands. Some are
> probably vendor specific. Annotations are from cdrecord.
Hmm, perhaps i should compare them against the mmc4-spec? They might do
nothing with mmc-drives?
> =WRITE=
> 0x04 FORMAT_UNIT // is this safe for disks?
No, according to sbc2-spec it will format the entire harddisc.
> =RAWIO=
> Some modes of WRITE_BUFFER are safe even for read, others
> overwrite firmware. Misdesign.
> 0x3B WRITE_BUFFER
According to spc3-spec (mentioned in sbc2) it will only used
to check performance of the device or programm the firmware
--
gnuPG keyid: 0xE94F63B7
fingerprint: D189 D5E3 FF4B 7E24 E49D 7638 07C5 924C E94F 63B7
-
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/