Re: [PATCH 1/2] scsi: Add scsi_device max_cmd_len (resend)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian King wrote:
James Bottomley wrote:
On Fri, 2006-04-28 at 14:03 -0500, Brian King wrote:
Perhaps you could tell me what the actual failure case is?
I don't have any data on how ATA/ATAPI devices respond if they receive
too large of a CDB, but my guess is they probably don't react nicely.
Today libata uses the hosts's max_cmd_len for some protection against
this, I was merely trying to continue with a similar level of
protection in my new usage of libata.
But how would they receive too large a CDB?

I suppose the only real exposure then would be someone doing passthru
commands in which we could argue that userspace should be smart enough
not to do things like this.

Going along with that argument, there's really no good reason for
libata to be playing games with scsi_host->max_cmd_len based on
the attached devices.

If both host controller and device support 16-byte CDB, it should not be limited to 12 bytes.

libata is not "playing games", just exporting what the hardware supports as best the API allows. It needs to support 16-byte CDBs for the same reason any SCSI LLDD supports 16-byte CDBs.

Remember ATAPI<->SCSI bridges exist, thus any SCSI disk can appear attached to ATAPI.

	Jeff



-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux