mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
kconfig.h: Include compiler types to avoid missed struct attributes
commit28128c61e0
upstream. 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: Patrick McLean <chutzpah@gentoo.org> Root-caused-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Fixes:3859a271a0
("randstruct: Mark various structs for randomization") Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
35d75b7bfc
commit
b3aff5c3b2
1 changed files with 3 additions and 0 deletions
|
@ -64,4 +64,7 @@
|
|||
*/
|
||||
#define IS_ENABLED(option) __or(IS_BUILTIN(option), IS_MODULE(option))
|
||||
|
||||
/* Make sure we always have all types and struct attributes defined. */
|
||||
#include <linux/compiler_types.h>
|
||||
|
||||
#endif /* __LINUX_KCONFIG_H */
|
||||
|
|
Loading…
Reference in a new issue