Re: [PATCH 1/2] build_bug.h: remove negative-array fallback for BUILD_BUG_ON()

From: Miguel Ojeda
Date: Sat Nov 24 2018 - 03:14:20 EST


On Fri, Nov 16, 2018 at 8:01 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> On Fri, Nov 16, 2018 at 12:19 AM, Masahiro Yamada
> <yamada.masahiro@xxxxxxxxxxxxx> wrote:
> > The kernel can only be compiled with an optimization option (-O2, -Os,
> > or the currently proposed -Og). Hence, __OPTIMIZE__ is always defined
> > in the kernel source.
> >
> > A fallback for -O0 case is just hypothetical and pointless. Moreover,
> > commit 0bb95f80a38f ("Makefile: Globally enable VLA warning") enabled
> > -Wvla warning. The use of variable length arrays is banned.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
>
> Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>

Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>

Cheers,
Miguel