From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Brian Bunker <brian@purestorage.com>,
Damien Le Moal <dlemoal@kernel.org>,
Hannes Reinecke <hare@suse.de>,
Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH v2 0/3] Rework the struct scsi_device inquiry information
Date: Fri, 15 May 2026 13:52:18 -0700 [thread overview]
Message-ID: <20260515205222.1754621-1-bvanassche@acm.org> (raw)
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(-)
next reply other threads:[~2026-05-15 20:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 20:52 Bart Van Assche [this message]
2026-05-15 20:52 ` [PATCH v2 1/3] scsi: core, target: Add INQUIRY-related constants into <scsi/scsi_common.h> Bart Van Assche
2026-05-15 20:52 ` [PATCH v2 2/3] scsi: core: Use the INQUIRY-related constants Bart Van Assche
2026-05-15 20:52 ` [PATCH v2 3/3] scsi: core: Convert INQUIRY information Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260515205222.1754621-1-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=brian@purestorage.com \
--cc=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox