[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAmqgVPcSa36H7J2ABPmgCkkn8d7Asy+Wdn-xmQLuPqTupE5Gg@mail.gmail.com>
Date: Fri, 26 May 2023 11:06:55 -0700
From: Justin Tee <justin.tee@...adcom.com>
To: Kees Cook <keescook@...omium.org>
Cc: Justin Tee <justintee8345@...il.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
James Smart <james.smart@...adcom.com>,
Dick Kennedy <dick.kennedy@...adcom.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2][next] scsi: lpfc: Use struct_size() helper
> > We probably should have declared no_of_objects as __be32 to have
> > avoided this confusion.
>
> Perhaps this patch can add that too?
Yes, please. Something like this is fine:
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 19b2d2754f32..e5a639d96122 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -1414,12 +1414,12 @@ struct app_id_object {
};
struct lpfc_vmid_rapp_ident_list {
- uint32_t no_of_objects;
+ __be32 no_of_objects;
struct entity_id_object obj[1];
};
struct lpfc_vmid_dapp_ident_list {
- uint32_t no_of_objects;
+ __be32 no_of_objects;
struct entity_id_object obj[1];
};
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4203 bytes)
Powered by blists - more mailing lists