kconfig.h: Include compiler types to avoid missed struct attributes
The header files for some structures could get included in such a way that struct attributes (specifically __randomize_layout from path.h) would be parsed as variable names instead of attributes. This could lead to some instances of a structure being unrandomized, causing nasty GPFs, etc. This patch makes sure the compiler_types.h header is included in kconfig.h so that we've always got types and struct attributes defined, since kconfig.h is included from the compiler command line. Reported-by: NPatrick McLean <chutzpah@gentoo.org> Root-caused-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name> Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org> Tested-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name> Fixes: 3859a271 ("randstruct: Mark various structs for randomization") Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录