aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-04-24 16:52:52 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-04-24 16:52:52 +0200
commit8cad95f56f63a63abab0ff0cb451c0bdd5a885dc (patch)
treebe7e1ad2d42c6ab61fd8156129c4dd3679da6b7f /include/linux/compiler-gcc.h
parentvideo: fbdev: s3c-fb: remove dead platform code for Exynos and S5PV210 platforms (diff)
parentLinux 4.17-rc2 (diff)
downloadwireguard-linux-8cad95f56f63a63abab0ff0cb451c0bdd5a885dc.tar.xz
wireguard-linux-8cad95f56f63a63abab0ff0cb451c0bdd5a885dc.zip
Merge tag 'v4.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 4.17-rc2
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 */