Skip to content

Rework the struct scsi_device inquiry information

Bart Van Assche linux-scsi 2 versions – Applied

Status from this message: Applied to 7.2/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesApplied
  2. v12 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- Added symbolic constants for the offsets in patch 1/3.
- Added a new patch 2/3.
- Converted one strscpy() call into a memcpy() call in patch 3/3 because the strscpy() call triggers a KASAN read-out-of-bounds complaint.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3scsi: core, target: Add INQUIRY-related constants into <scsi/scsi_common.h>include/scsi/scsi_common.h include/target/target_core_base.h+9 -40 replies
2/3scsi: core: Use the INQUIRY-related constantsdrivers/scsi/scsi_scan.c+10 -50 replies
3/3scsi: core: Convert INQUIRY informationdrivers/hwmon/drivetemp.c drivers/scsi/scsi_scan.c include/scsi/scsi_device.h+17 -130 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchBrian Bunker
SeriesT-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] Rework the struct scsi_device inquiry information

Hi Martin,

The vendor, model and rev members in struct scsi_device are fixed-length strings that are not NUL-terminated. This patch converts these members into NUL-terminated character arrays. This makes it less error-prone to deal with these structure members. The patches in this series have been implemented such that the number of lines changed and the risk for regressions is minimized.

Please consider this patch series for the next merge window.

Thanks,

Bart.

Changes compared to v1:
- Added symbolic constants for the offsets in patch 1/3.
- Added a new patch 2/3.
- Converted one strscpy() call into a memcpy() call in patch 3/3 because the strscpy() call triggers a KASAN read-out-of-bounds complaint.

Bart Van Assche (3):
scsi: core, target: Add INQUIRY-related constants into
<scsi/scsi_common.h>
scsi: core: Use the INQUIRY-related constants
scsi: core: Convert INQUIRY information

 drivers/hwmon/drivetemp.c         |  5 +----
 drivers/scsi/scsi_scan.c          | 33 ++++++++++++++++++++-----------
 include/scsi/scsi_common.h        |  8 ++++++++
 include/scsi/scsi_device.h        |  7 ++++---
 include/target/target_core_base.h |  5 +----
 5 files changed, 36 insertions(+), 22 deletions(-)