aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-05 14:46:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-05 14:46:59 -0400
commit59005b0c59a164101b0273e4bda212c809dc2246 (patch)
tree0251ddc36367a2b314f2dbe8b4d9711cdd51408a /include/linux/compiler.h
parent2cc7b4ca7d01a844651d34b79ff8d778c7e9a875 (diff)
parentd1185a8c5dd21182012e6dd531b00fd72f4d30cb (diff)
Merge tag 'gcc-plugins-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull GCC plugin updates from Kees Cook: "The big part is the randstruct plugin infrastructure. This is the first of two expected pull requests for randstruct since there are dependencies in other trees that would be easier to merge once those have landed. Notably, the IPC allocation refactoring in -mm, and many trivial merge conflicts across several trees when applying the __randomize_layout annotation. As a result, it seemed like I should send this now since it is relatively self-contained, and once the rest of the trees have landed, send the annotation patches. I'm expecting the final phase of randstruct (automatic struct selection) will land for v4.14, but if its other tree dependencies actually make it for v4.13, I can send that merge request too. Summary: - typo fix in Kconfig (Jean Delvare) - randstruct infrastructure" * tag 'gcc-plugins-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: ARM: Prepare for randomized task_struct randstruct: Whitelist NIU struct page overloading randstruct: Whitelist big_key path struct overloading randstruct: Whitelist UNIXCB cast randstruct: Whitelist struct security_hook_heads cast gcc-plugins: Add the randstruct plugin Fix English in description of GCC_PLUGIN_STRUCTLEAK compiler: Add __designated_init annotation gcc-plugins: Detail c-common.h location for GCC 4.6
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 707242fdbb89..219f82f3ec1a 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -436,10 +436,22 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
436# define __attribute_const__ /* unimplemented */ 436# define __attribute_const__ /* unimplemented */
437#endif 437#endif
438 438
439#ifndef __designated_init
440# define __designated_init
441#endif
442
439#ifndef __latent_entropy 443#ifndef __latent_entropy
440# define __latent_entropy 444# define __latent_entropy
441#endif 445#endif
442 446
447#ifndef __randomize_layout
448# define __randomize_layout __designated_init
449#endif
450
451#ifndef __no_randomize_layout
452# define __no_randomize_layout
453#endif
454
443/* 455/*
444 * Tell gcc if a function is cold. The compiler will assume any path 456 * Tell gcc if a function is cold. The compiler will assume any path
445 * directly leading to the call is unlikely. 457 * directly leading to the call is unlikely.