Spdk/test/iscsi_tgt
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
..
calsoft iscsi: Replace "ALL" by "ANY" for access control 2017-12-04 11:28:52 -05:00
ext4test iscsi: Replace "ALL" by "ANY" for access control 2017-12-04 11:28:52 -05:00
filesystem iscsi: Replace "ALL" by "ANY" for access control 2017-12-04 11:28:52 -05:00
fio iscsi: Replace "ALL" by "ANY" for access control 2017-12-04 11:28:52 -05:00
idle_migration iscsi: Replace "ALL" by "ANY" for access control 2017-12-04 11:28:52 -05:00
ip_migration test/iscsi/ip_migration: remove [Rpc] conf section 2017-12-05 13:16:57 -05:00
lvol test/iscsi: reduce per-patch test times 2017-12-15 15:48:06 -05:00
nvme_remote test/iscsi_tgt: increase memory for nvmf_tgt app 2017-12-04 18:47:25 -05:00
pmem bdev/pmem: require name in construct_pmem_bdev RPC 2017-12-04 18:51:14 -05:00
rbd iscsi: Replace "ALL" by "ANY" for access control 2017-12-04 11:28:52 -05:00
reset iscsi: Replace "ALL" by "ANY" for access control 2017-12-04 11:28:52 -05:00
rpc_config scsi&test/iscsi_tgt: SCSI device == iSCSI name 2017-12-19 13:34:03 -05:00
common.sh test/iscsi_tgt: use stub application 2017-05-25 16:55:03 -04:00
iscsi_tgt.sh test/iscsi: reduce per-patch test times 2017-12-15 15:48:06 -05:00
test_plan.md test/iscsi: Add iscsi_tgt with NVML backend test 2017-10-19 13:00:27 -04:00