numam-spdk/test
Shuhei Matsumoto b37d1b60f1 scsi&test/iscsi_tgt: SCSI device == iSCSI name
In the iSCSI specification, the SCSI device name is defined to be
the iSCSI name of the node.

However, when g_spdk_iscsi.nodebase is used, the SCSI device name
is made of the device specific string (the part of IQN after the
colon).

The size of the temporary buffer fullname[MAX_TMPBUF] in
spdk_iscsi_tgt_node_construct() is 1024 and the size of
spdk_scsi_dev.name is 255. The former is larger than the later.

However the max length of IQN, EUI, NAA are 223, 20, and 36,
respectively. All are less than 255.

Hence even if we use fullname as the SCSI device name, no overflow
will occur. Even if fullname is more than 255, strncpy() does not
write more than 255 in spdk_scsi_dev_construct().

It's possible to check the length of iSCSI name strictly, but I
will do the least in this patch.

Change-Id: Icc6655fcd846797720867c10e316d2951c664030
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/390360
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-12-19 13:34:03 -05:00
..
app nbd: add NBD subsystem to apps 2017-12-12 13:36:22 -05:00
blobfs/rocksdb test/rocksdb: reduce test time for per-patch tests 2017-12-15 15:48:06 -05:00
config test/vm_setup.sh: add missing packages from pkgdep.sh 2017-12-15 16:16:31 -05:00
cpp_headers build: include spdk.app.mk in all app Makefiles 2017-11-15 17:57:07 -05:00
iscsi_tgt scsi&test/iscsi_tgt: SCSI device == iSCSI name 2017-12-19 13:34:03 -05:00
lib bdevperf: change type of io_completed to uint64_t 2017-12-19 11:58:30 -05:00
lvol test/lvol: Replace stop/start vhost with add/delete bdev 2017-12-13 11:26:54 -05:00
nvmf nvmf: add support of hotplug for nvmf. 2017-12-15 16:14:02 -05:00
pmem bdev/pmem: require name in construct_pmem_bdev RPC 2017-12-04 18:51:14 -05:00
unit nvme: Add support of hot remove vfio-attached devices in pcie layer. 2017-12-19 13:07:20 -05:00
vhost test: add timing calls to vhost/initiator/blockdev.sh 2017-12-19 11:10:57 -05:00
Makefile test: begin moving unit tests into test/unit 2017-06-16 16:43:48 -04:00
spdk_cunit.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00