diff options
author | Kees Cook <keescook@chromium.org> | 2023-01-04 16:48:01 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-01-12 00:09:52 -0500 |
commit | 45b379f20bc0fecccad63c25bfe28d75d6bc5b0d (patch) | |
tree | e6a3d4282317ebff7886a362242bd3f91e314eec /drivers/scsi/mvumi.c | |
parent | dae0bb3e1ab8a67771213f5526deb238b15a736b (diff) | |
download | linux-stable-45b379f20bc0fecccad63c25bfe28d75d6bc5b0d.tar.gz linux-stable-45b379f20bc0fecccad63c25bfe28d75d6bc5b0d.tar.bz2 linux-stable-45b379f20bc0fecccad63c25bfe28d75d6bc5b0d.zip |
scsi: 3w-sas: Replace 1-element arrays with flexible array members
One-element arrays (and multi-element arrays being treated as dynamically
sized) are deprecated[1] and are being replaced with flexible array members
in support of the ongoing efforts to tighten the FORTIFY_SOURCE routines on
memcpy(), correctly instrument array indexing with UBSAN_BOUNDS, and to
globally enable -fstrict-flex-arrays=3.
Replace one-element arrays with flexible-array member in TW_Ioctl_Buf_Apache
and TW_Param_Apache, adjusting the explicit sizing calculations at the
same time.
This results in no differences in binary output.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays
Cc: Adam Radford <aradford@gmail.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230105004757.never.017-kees@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mvumi.c')
0 files changed, 0 insertions, 0 deletions