linux/include/uapi/scsi
Kees Cook c6f2e6b6ea scsi: mpi3mr: Replace 1-element array with flex-array
Nothing else defined MPI3_NVME_ENCAP_CMD_MAX, so the "command" buffer was
being defined as a fake flexible array of size 1. Replace this with a
proper flex array. Avoids this GCC 13 warning under -fstrict-flex-arrays=3:

In function 'fortify_memset_chk',
    inlined from 'mpi3mr_build_nvme_sgl' at ../drivers/scsi/mpi3mr/mpi3mr_app.c:693:2,
    inlined from 'mpi3mr_bsg_process_mpt_cmds.constprop' at ../drivers/scsi/mpi3mr/mpi3mr_app.c:1214:8:
../include/linux/fortify-string.h:430:25: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()?  [-Wattribute-warning]
  430 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20230204183715.never.937-kees@kernel.org
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: kernel test robot <lkp@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-02-21 22:00:50 -05:00
..
fc treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
cxlflash_ioctl.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
scsi_bsg_fc.h scsi: uapi: Replace 0-length array with flexible array 2023-01-13 20:25:53 -05:00
scsi_bsg_mpi3mr.h scsi: mpi3mr: Replace 1-element array with flex-array 2023-02-21 22:00:50 -05:00
scsi_bsg_ufs.h scsi: ufs: core: bsg: Fix cast to restricted __be16 warning 2023-01-11 22:16:59 -05:00
scsi_netlink_fc.h scsi: scsi_transport_fc: Adjust struct fc_nl_event flex array usage 2022-09-25 12:52:48 -04:00
scsi_netlink.h scsi: use __u{8,16,32,64} instead of uint{8,16,32,64}_t in uapi headers 2019-08-12 22:19:27 -04:00