Re: [PATCH v4 2/2] Remove false-positive VLAs when using max()

2018-03-16 Thread Nikolay Borisov
On 15.03.2018 21:47, Kees Cook wrote: > As part of removing VLAs from the kernel[1], we want to build with -Wvla, > but it is overly pessimistic and only accepts constant expressions for > stack array sizes, instead of also constant values. The max() macro > triggers the warning, so this

[PATCH v4 2/2] Remove false-positive VLAs when using max()

2018-03-15 Thread Kees Cook
As part of removing VLAs from the kernel[1], we want to build with -Wvla, but it is overly pessimistic and only accepts constant expressions for stack array sizes, instead of also constant values. The max() macro triggers the warning, so this refactors these uses of max() to use the new