diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2023-11-15 10:04:03 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-11-15 10:04:03 -0500 |
commit | fd7090e384725edb1910a4b0a9c51007858f2c81 (patch) | |
tree | c18e6646d1383fa9d3e70c1b74eeb56da1f140bb /tools/perf/scripts/python/export-to-sqlite.py | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) | |
parent | e188215562727972cb49681b6ea56936455cf66e (diff) |
Merge patch series "scsi: mpt3sas: Use flexible arrays and do a few cleanups"
James Seo <james@equiv.tech> says:
Commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") has
resulted in the only arrays that UBSAN_BOUNDS considers unbounded
being trailing arrays declared with [] as the last member of a
struct. Unbounded trailing arrays declared with [1] are common in
mpt3sas, which is causing spurious warnings to appear in some
situations, e.g. when more than one physical disk is connected:
UBSAN: array-index-out-of-bounds in drivers/scsi/mpt3sas/mpt3sas_scsih.c:6810:36
index 1 is out of range for type 'MPI2_SAS_IO_UNIT0_PHY_DATA [1]'
which relates to this unbounded array access:
port_id = sas_iounit_pg0->PhyData[i].Port;
and is just one example of 10 similar warnings currently occurring for
me during boot.
This series converts most trailing arrays declared with [1] in mptsas
into proper C99 flexible array members. Those that are not unbounded
and really are fixed-length arrays of length 1 are left alone.
I didn't find any conversions that required further source edits
besides changing [1] to [], and everything seems to work with my
SAS2008-based add-in card, but please look things over in case I
missed something subtle.
Rounding out the series are some opportunistic cleanups.
The only dependency is that patch 7 ("Use struct_size() for struct
size calculations") depends on patches 3-5.
Link: https://lore.kernel.org/r/20230806170604.16143-1-james@equiv.tech
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions