aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-04-05 12:49:19 -0400
committerKees Cook <keescook@chromium.org>2017-05-28 13:23:03 -0400
commit0aa5e49c6845ecd82531341085f367767c9f419a (patch)
treedd7b9d4a2bad900e26a42810304ae571df61183a /include/linux/compiler.h
parent1132e1e448ce51e3b51fc7afdf661633abc4f202 (diff)
compiler: Add __designated_init annotation
This allows structure annotations for requiring designated initialization in GCC 5.1.0 and later: https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html The structure randomization layout plugin will be using this to help identify structures that need this form of initialization. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index f8110051188f..80a1dea36cbe 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -440,6 +440,10 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
440# define __attribute_const__ /* unimplemented */ 440# define __attribute_const__ /* unimplemented */
441#endif 441#endif
442 442
443#ifndef __designated_init
444# define __designated_init
445#endif
446
443#ifndef __latent_entropy 447#ifndef __latent_entropy
444# define __latent_entropy 448# define __latent_entropy
445#endif 449#endif