Spdk/lib/iscsi
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
..
acceptor.c iscsi: Remove nested, duplicated, or unreferenced file inclusion 2017-12-14 11:30:05 -05:00
acceptor.h iscsi: login poller per portal and portal cache 2017-10-06 17:00:45 -04:00
conn.c iscsi: Remove use of perror for malloc, strdup, and writev failure 2017-12-19 11:41:43 -05:00
conn.h iscsi: Remove nested, duplicated, or unreferenced file inclusion 2017-12-14 11:30:05 -05:00
init_grp.c iscsi: Remove use of perror for malloc, strdup, and writev failure 2017-12-19 11:41:43 -05:00
init_grp.h iscsi: Remove gropu_state from IG and PG 2017-12-04 11:28:52 -05:00
iscsi_rpc.c iscsi/rpc&test/iscsi_tgt: get iSCSI global params 2017-12-14 11:30:05 -05:00
iscsi_subsystem.c iscsi: Remove use of perror for malloc, strdup, and writev failure 2017-12-19 11:41:43 -05:00
iscsi.c iscsi: Remove use of perror for malloc, strdup, and writev failure 2017-12-19 11:41:43 -05:00
iscsi.h iscsi: Use spdk_mempool for session and pdu related pool 2017-12-11 19:42:21 -05:00
Makefile util: add CRC32 utility functions 2017-08-02 19:47:35 -04:00
md5.c astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
md5.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
param.c iscsi: Remove use of perror for malloc, strdup, and writev failure 2017-12-19 11:41:43 -05:00
param.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
portal_grp.c iscsi: Remove use of perror for malloc, strdup, and writev failure 2017-12-19 11:41:43 -05:00
portal_grp.h iscsi: Remove gropu_state from IG and PG 2017-12-04 11:28:52 -05:00
task.c iscsi: let task_pool use spdk_mempool related functions 2017-12-06 17:03:15 -05:00
task.h iscsi: change iscsi_bhs_scsi_req variable names. 2017-07-18 13:14:16 -04:00
tgt_node.c scsi&test/iscsi_tgt: SCSI device == iSCSI name 2017-12-19 13:34:03 -05:00
tgt_node.h iscsi: Dynamic reconfiguration of PG-IG maps 2017-12-07 12:28:02 -05:00