From: Kees Cook <keescook@chromium.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Kevin Barnett <kevin.barnett@microsemi.com>,
Don Brace <don.brace@microchip.com>,
storagedev@microchip.com,
"James E.J. Bottomley" <jejb@linux.ibm.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 2/3][next] scsi: smartpqi: Replace one-element arrays with flexible-array members
Date: Thu, 2 Feb 2023 20:28:28 +0000 [thread overview]
Message-ID: <63dc1ced.170a0220.f43a2.02c5@mx.google.com> (raw)
In-Reply-To: <62bb7891b3a752e7302286030ba9fafe58dffb1e.1663816572.git.gustavoars@kernel.org>
On Wed, Sep 21, 2022 at 11:29:29PM -0500, Gustavo A. R. Silva wrote:
> One-element arrays are deprecated, and we are replacing them with flexible
> array members instead. So, replace one-element array with flexible-array
> member in structures report_phys_lun_8byte_wwid_list and
> report_phys_lun_16byte_wwid_list.
>
> This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines
> on memcpy().
>
> Link: https://github.com/KSPP/linux/issues/79
> Link: https://github.com/KSPP/linux/issues/204
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Are there any binary differences after this patch? I assume not, so:
Reviewed-by: Kees Cook <keescook@chromium.org>
> ---
> drivers/scsi/smartpqi/smartpqi.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/smartpqi/smartpqi.h b/drivers/scsi/smartpqi/smartpqi.h
> index d1756c9d1112..b31b42530674 100644
> --- a/drivers/scsi/smartpqi/smartpqi.h
> +++ b/drivers/scsi/smartpqi/smartpqi.h
> @@ -982,12 +982,12 @@ struct report_phys_lun_16byte_wwid {
>
> struct report_phys_lun_8byte_wwid_list {
> struct report_lun_header header;
> - struct report_phys_lun_8byte_wwid lun_entries[1];
> + struct report_phys_lun_8byte_wwid lun_entries[];
> };
>
> struct report_phys_lun_16byte_wwid_list {
> struct report_lun_header header;
> - struct report_phys_lun_16byte_wwid lun_entries[1];
> + struct report_phys_lun_16byte_wwid lun_entries[];
> };
>
> struct raid_map_disk_data {
> --
> 2.34.1
>
--
Kees Cook
next prev parent reply other threads:[~2023-02-02 20:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 4:26 [PATCH 0/3][next] scsi: smartpqi: Replace one-element arrays with flexible-array members Gustavo A. R. Silva
2022-09-22 4:28 ` [PATCH 1/3][next] scsi: smartpqi: Replace one-element array with flexible-array member Gustavo A. R. Silva
2023-02-02 20:25 ` Kees Cook
[not found] ` <CY4PR11MB12387B9F495BC7B5D0F5FD84E1DA9@CY4PR11MB1238.namprd11.prod.outlook.com>
2023-02-06 22:28 ` Gustavo A. R. Silva
[not found] ` <CY4PR11MB123855C0E92965CD5B46C9B6E1DB9@CY4PR11MB1238.namprd11.prod.outlook.com>
2023-02-07 21:53 ` Gustavo A. R. Silva
2022-09-22 4:29 ` [PATCH 2/3][next] scsi: smartpqi: Replace one-element arrays with flexible-array members Gustavo A. R. Silva
2023-02-02 20:28 ` Kees Cook [this message]
2022-09-22 4:30 ` [PATCH 3/3][next] scsi: smartpqi: Use struct_size() helper in pqi_report_phys_luns() Gustavo A. R. Silva
2023-02-02 20:29 ` Kees Cook
2023-01-31 20:14 ` [PATCH 0/3][next] scsi: smartpqi: Replace one-element arrays with flexible-array members Gustavo A. R. Silva
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=63dc1ced.170a0220.f43a2.02c5@mx.google.com \
--to=keescook@chromium.org \
--cc=don.brace@microchip.com \
--cc=gustavoars@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=kevin.barnett@microsemi.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=storagedev@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.