Linus Torvalds writes: (Summary) Some of our related helper macros (ie
randomized_struct_fields_start/end) don't have the same problem, because if you don't have the define for them, the compiler will complain about bad syntax.
complain about bad syntax.
And other attribute specifiers we encourage people to put in other parts of the type, like __user etc, so they don't have that same parsing issue.
parsing issue.
I guess one _extreme_ fix for this would be to put
I guess one _extreme_ fix for this would be to put
extern struct nostruct __randomize_layout;
extern struct nostruct __randomize_layout;
in our include/linux/kconfig.h, which I think we end up always including first thanks to having it on the command line.
randomized_struct_fields_start/end) don't have the same problem, because if you don't have the define for them, the compiler will complain about bad syntax.
complain about bad syntax.
And other attribute specifiers we encourage people to put in other parts of the type, like __user etc, so they don't have that same parsing issue.
parsing issue.
I guess one _extreme_ fix for this would be to put
I guess one _extreme_ fix for this would be to put
extern struct nostruct __randomize_layout;
extern struct nostruct __randomize_layout;
in our include/linux/kconfig.h, which I think we end up always including first thanks to having it on the command line.