Re: [PATCH 2/5] treewide: Replace open-coded flex arrays in unions

2021-08-18 Thread Kees Cook
On Wed, Aug 18, 2021 at 11:56:35AM +0200, Marc Kleine-Budde wrote: > On 18.08.2021 01:11:15, Kees Cook wrote: > > diff --git a/drivers/net/can/usb/etas_es58x/es581_4.h > > b/drivers/net/can/usb/etas_es58x/es581_4.h > > index 4bc60a6df697..8657145dc2a9 100644 > > ---

Re: [PATCH 2/5] treewide: Replace open-coded flex arrays in unions

2021-08-18 Thread Marc Kleine-Budde
On 18.08.2021 01:11:15, Kees Cook wrote: > diff --git a/drivers/net/can/usb/etas_es58x/es581_4.h > b/drivers/net/can/usb/etas_es58x/es581_4.h > index 4bc60a6df697..8657145dc2a9 100644 > --- a/drivers/net/can/usb/etas_es58x/es581_4.h > +++ b/drivers/net/can/usb/etas_es58x/es581_4.h > @@ -192,7

[PATCH 2/5] treewide: Replace open-coded flex arrays in unions

2021-08-18 Thread Kees Cook
In support of enabling -Warray-bounds and -Wzero-length-bounds and correctly handling run-time memcpy() bounds checking, replace all open-coded flexible arrays (i.e. 0-element arrays) in unions with the flex_array() helper macro. This fixes warnings such as: fs/hpfs/anode.c: In function