Re: [PATCH v2 00/12] scsi: mpt3sas: Use flexible arrays and do a few cleanups

From: Kees Cook
Date: Tue Oct 10 2023 - 20:49:53 EST


On Thu, Aug 24, 2023 at 11:00:57PM -0400, Martin K. Petersen wrote:
>
> > 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:
>
> Broadcom: Please review/test. Thanks!

Another thread ping. Is anyone at broadcom around? I'd really like to
see this series (or some form of it) land to avoid all these runtime
warnings...

--
Kees Cook