]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: mpt3sas: Mark device strings as nonstring
authorKees Cook <kees@kernel.org>
Wed, 5 Feb 2025 21:41:33 +0000 (13:41 -0800)
committerKees Cook <kees@kernel.org>
Fri, 28 Feb 2025 19:51:32 +0000 (11:51 -0800)
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>
drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
drivers/scsi/mpt3sas/mpt3sas_transport.c

index 587f7d2482190d8bd4672dcf052f0e141644e87f..d123d3b740e104caf3ed1fd50a038eca53de74a9 100644 (file)
@@ -606,7 +606,7 @@ typedef struct _MPI2_CONFIG_REPLY {
 
 typedef struct _MPI2_CONFIG_PAGE_MAN_0 {
        MPI2_CONFIG_PAGE_HEADER Header;                     /*0x00 */
-       U8                      ChipName[16];               /*0x04 */
+       U8                      ChipName[16] __nonstring;   /*0x04 */
        U8                      ChipRevision[8];            /*0x14 */
        U8                      BoardName[16];              /*0x1C */
        U8                      BoardAssembly[16];          /*0x2C */
index d84413b77d84999d5c3d43490575122123794d5d..dc74ebc6405ace7d5edf5d77d20f7f9d35153c99 100644 (file)
@@ -328,10 +328,10 @@ struct rep_manu_reply {
        u8 reserved0[2];
        u8 sas_format;
        u8 reserved2[3];
-       u8 vendor_id[SAS_EXPANDER_VENDOR_ID_LEN];
-       u8 product_id[SAS_EXPANDER_PRODUCT_ID_LEN];
-       u8 product_rev[SAS_EXPANDER_PRODUCT_REV_LEN];
-       u8 component_vendor_id[SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN];
+       u8 vendor_id[SAS_EXPANDER_VENDOR_ID_LEN] __nonstring;
+       u8 product_id[SAS_EXPANDER_PRODUCT_ID_LEN] __nonstring;
+       u8 product_rev[SAS_EXPANDER_PRODUCT_REV_LEN] __nonstring;
+       u8 component_vendor_id[SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN] __nonstring;
        u16 component_id;
        u8 component_revision_id;
        u8 reserved3;