Skip to content

Commit 3408541

Browse files
Chandrakanth Patilroot
authored andcommitted
scsi: mpt3sas: Mark device strings as nonstring
JIRA: https://issues.redhat.com/browse/RHEL-81907 In preparation for memtostr*() checking that its source is marked as nonstring, annotate the device strings accordingly. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> # SCSI Signed-off-by: Kees Cook <kees@kernel.org> (cherry picked from commit d66ad1e) Signed-off-by: Chandrakanth Patil <chanpati@redhat.com>
1 parent cb7d937 commit 3408541

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ typedef struct _MPI2_CONFIG_REPLY {
607607

608608
typedef struct _MPI2_CONFIG_PAGE_MAN_0 {
609609
MPI2_CONFIG_PAGE_HEADER Header; /*0x00 */
610-
U8 ChipName[16]; /*0x04 */
610+
U8 ChipName[16] __nonstring; /*0x04 */
611611
U8 ChipRevision[8]; /*0x14 */
612612
U8 BoardName[16]; /*0x1C */
613613
U8 BoardAssembly[16]; /*0x2C */

drivers/scsi/mpt3sas/mpt3sas_transport.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,10 @@ struct rep_manu_reply {
328328
u8 reserved0[2];
329329
u8 sas_format;
330330
u8 reserved2[3];
331-
u8 vendor_id[SAS_EXPANDER_VENDOR_ID_LEN];
332-
u8 product_id[SAS_EXPANDER_PRODUCT_ID_LEN];
333-
u8 product_rev[SAS_EXPANDER_PRODUCT_REV_LEN];
334-
u8 component_vendor_id[SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN];
331+
u8 vendor_id[SAS_EXPANDER_VENDOR_ID_LEN] __nonstring;
332+
u8 product_id[SAS_EXPANDER_PRODUCT_ID_LEN] __nonstring;
333+
u8 product_rev[SAS_EXPANDER_PRODUCT_REV_LEN] __nonstring;
334+
u8 component_vendor_id[SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN] __nonstring;
335335
u16 component_id;
336336
u8 component_revision_id;
337337
u8 reserved3;

0 commit comments

Comments
 (0)