[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28c303f1-facd-4d81-9255-6a57fa330a4e@embeddedor.com>
Date: Thu, 11 Jul 2024 12:33:14 -0600
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Kees Cook <kees@...nel.org>, Brian King <brking@...ibm.com>
Cc: "James E.J. Bottomley" <James.Bottomley@...senPartnership.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] scsi: ipr: Replace 1-element arrays with flexible arrays
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@...nel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@...nel.org>
Thanks
-- 
Gustavo
> ---
> Cc: Brian King <brking@...ibm.com>
> Cc: "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>
> Cc: "Martin K. Petersen" <martin.petersen@...cle.com>
> Cc: linux-scsi@...r.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) \
Powered by blists - more mailing lists
 
