[PATCH v2 01/10] target: XCOPY parameter handling fixes

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

 



Changes since v1:
- combine https://www.spinics.net/lists/target-devel/msg13789.html
  and http://www.spinics.net/lists/target-devel/msg13832.html patch-sets
  + no changes to patches 01-04
- drop unneeded brackets
- use #define for [sd]tdi maximums
- use unsigned short for cscd_index
- use switch statement for target_xcopy_locate_se_dev_e4() caller

SPC4r37 specifies a number of restrictions placed on the XCOPY request
target and segment descriptor list sizes, and defines sense codes for
use when these constraints are exceeded.

This patch-set improves existing checks to use correct sense codes, and
adds missing parameter validation.
One further change is a fix for segment descriptor CSCD ID handling:
https://bugzilla.kernel.org/show_bug.cgi?id=191381
LIO currently incorrectly assumes that the copy source and destination
descriptors are placed in source->dest order in the CSCD descriptor
list, instead of using the IDs carried in the segment descriptor, as
is directed in SPC-4.

A reproducer for this bug can be found at:
https://github.com/ddiss/libiscsi iscsi-dd-xcopy-bko191381-reproducer

Feedback appreciated.

Cheers, David

--

 drivers/target/target_core_transport.c |  24 ++++
 drivers/target/target_core_xcopy.c     | 158 +++++++++++++++++--------
 drivers/target/target_core_xcopy.h     |   7 ++
 include/target/target_core_base.h      |   4 +
 4 files changed, 142 insertions(+), 51 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux