linux-stable/drivers/target
David Disseldorp e562057290 scsi: target: use consistent left-aligned ASCII INQUIRY data
[ Upstream commit 0de263577d ]

spc5r17.pdf specifies:

  4.3.1 ASCII data field requirements
  ASCII data fields shall contain only ASCII printable characters (i.e.,
  code values 20h to 7Eh) and may be terminated with one or more ASCII null
  (00h) characters.  ASCII data fields described as being left-aligned
  shall have any unused bytes at the end of the field (i.e., highest
  offset) and the unused bytes shall be filled with ASCII space characters
  (20h).

LIO currently space-pads the T10 VENDOR IDENTIFICATION and PRODUCT
IDENTIFICATION fields in the standard INQUIRY data. However, the PRODUCT
REVISION LEVEL field in the standard INQUIRY data as well as the T10 VENDOR
IDENTIFICATION field in the INQUIRY Device Identification VPD Page are
zero-terminated/zero-padded.

Fix this inconsistency by using space-padding for all of the above fields.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bryant G. Ly <bly@catalogicsoftware.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-26 09:38:34 +01:00
..
iscsi scsi: target: iscsi: cxgbit: fix csk leak 2019-01-23 08:10:53 +01:00
loopback
sbp
tcm_fc
Kconfig
Makefile
target_core_alua.c target: fix race during implicit transition work flushes 2017-12-20 10:07:26 +01:00
target_core_alua.h
target_core_configfs.c
target_core_device.c
target_core_fabric_configfs.c
target_core_fabric_lib.c
target_core_file.c tcm_fileio: Prevent information leak for short reads 2018-03-24 11:00:20 +01:00
target_core_file.h
target_core_hba.c
target_core_iblock.c
target_core_iblock.h
target_core_internal.h
target_core_pr.c target:fix condition return in core_pr_dump_initiator_port() 2017-12-20 10:07:29 +01:00
target_core_pr.h
target_core_pscsi.c
target_core_pscsi.h
target_core_rd.c
target_core_rd.h
target_core_sbc.c
target_core_spc.c scsi: target: use consistent left-aligned ASCII INQUIRY data 2019-01-26 09:38:34 +01:00
target_core_stat.c
target_core_tmr.c target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:38:54 +01:00
target_core_tpg.c target: Fix node_acl demo-mode + uncached dynamic shutdown regression 2017-08-16 13:43:17 -07:00
target_core_transport.c scsi: target: fix __transport_register_session locking 2018-09-19 22:47:12 +02:00
target_core_ua.c
target_core_ua.h
target_core_user.c
target_core_xcopy.c
target_core_xcopy.h