aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-06-04 13:33:12 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-06-04 13:33:12 -0700
commitc13aca79ff3c4af5fd31a5b2743a90eba6e36a26 (patch)
tree8f77894f61822d1ae5285c07c801af7c62f71afd /include/linux/compiler-gcc.h
parentInput: elan_i2c_smbus - fix corrupted stack (diff)
parentInput: goodix - add new ACPI id for GPD Win 2 touch screen (diff)
downloadwireguard-linux-c13aca79ff3c4af5fd31a5b2743a90eba6e36a26.tar.xz
wireguard-linux-c13aca79ff3c4af5fd31a5b2743a90eba6e36a26.zip
Merge branch 'next' into for-linus
Prepare input updates for 4.18 merge window.
Diffstat (limited to '')
-rw-r--r--include/linux/compiler-gcc.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index e2c7f4369eff..b4bf73f5e38f 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -242,6 +242,9 @@
#if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__)
#define __randomize_layout __attribute__((randomize_layout))
#define __no_randomize_layout __attribute__((no_randomize_layout))
+/* This anon struct can add padding, so only enable it under randstruct. */
+#define randomized_struct_fields_start struct {
+#define randomized_struct_fields_end } __randomize_layout;
#endif
#endif /* GCC_VERSION >= 40500 */
@@ -256,15 +259,6 @@
*/
#define __visible __attribute__((externally_visible))
-/*
- * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only
- * possible since GCC 4.6. To provide as much build testing coverage
- * as possible, this is used for all GCC 4.6+ builds, and not just on
- * RANDSTRUCT_PLUGIN builds.
- */
-#define randomized_struct_fields_start struct {
-#define randomized_struct_fields_end } __randomize_layout;
-
#endif /* GCC_VERSION >= 40600 */