From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Kees Cook <kees@kernel.org>, Brian King <brking@us.ibm.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] scsi: ipr: Replace 1-element arrays with flexible arrays
Date: Thu, 11 Jul 2024 12:33:14 -0600 [thread overview]
Message-ID: <28c303f1-facd-4d81-9255-6a57fa330a4e@embeddedor.com> (raw)
In-Reply-To: <20240711180702.work.536-kees@kernel.org>
On 11/07/24 12:07, Kees Cook wrote:
> Replace the deprecated[1] use of a 1-element arrays in
> struct ipr_hostrcb_fabric_desc and struct ipr_hostrcb64_fabric_desc
> with modern flexible arrays.
>
> No binary differences are present after this conversion.
>
> Link: https://github.com/KSPP/linux/issues/79 [1]
> Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Thanks
--
Gustavo
> ---
> Cc: Brian King <brking@us.ibm.com>
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: linux-scsi@vger.kernel.org
> ---
> drivers/scsi/ipr.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
> index c77d6ca1a210..b2b643c6dbbe 100644
> --- a/drivers/scsi/ipr.h
> +++ b/drivers/scsi/ipr.h
> @@ -1030,7 +1030,7 @@ struct ipr_hostrcb_fabric_desc {
> #define IPR_PATH_FAILED 0x03
>
> __be16 num_entries;
> - struct ipr_hostrcb_config_element elem[1];
> + struct ipr_hostrcb_config_element elem[];
> }__attribute__((packed, aligned (4)));
>
> struct ipr_hostrcb64_fabric_desc {
> @@ -1044,7 +1044,7 @@ struct ipr_hostrcb64_fabric_desc {
> u8 res_path[8];
> u8 reserved3[6];
> __be16 num_entries;
> - struct ipr_hostrcb64_config_element elem[1];
> + struct ipr_hostrcb64_config_element elem[];
> }__attribute__((packed, aligned (8)));
>
> #define for_each_hrrq(hrrq, ioa_cfg) \
next prev parent reply other threads:[~2024-07-11 18:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 18:07 [PATCH] scsi: ipr: Replace 1-element arrays with flexible arrays Kees Cook
2024-07-11 18:33 ` Gustavo A. R. Silva [this message]
2024-08-03 1:30 ` Martin K. Petersen
2024-08-05 21:17 ` Martin K. Petersen
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=28c303f1-facd-4d81-9255-6a57fa330a4e@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=brking@us.ibm.com \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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