Kbuild: make designated_init attribute fatal
authorKees Cook <keescook@chromium.org>
Tue, 21 Mar 2017 00:14:11 +0000 (17:14 -0700)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 21 Mar 2017 17:50:25 +0000 (02:50 +0900)
commitc834f0e8a8bb3025aac38e802fca2e686720f544
treec53de99eef392f795629261ecbcc4c5b7b27c99b
parentf78271dfb77353c4d045f9735deebe21839fb2ed
Kbuild: make designated_init attribute fatal

If a structure is marked with __attribute__((designated_init)) from
GCC or Sparse, it needs to have all static initializers using designated
initialization. Fail the build for any missing cases. This attribute will
be used by the randstruct plugin to make sure randomized structures are
being correctly initialized.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile