diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-05 11:46:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-05 11:46:59 -0700 |
commit | 59005b0c59a164101b0273e4bda212c809dc2246 (patch) | |
tree | 0251ddc36367a2b314f2dbe8b4d9711cdd51408a /include/linux/compiler.h | |
parent | 2cc7b4ca7d01a844651d34b79ff8d778c7e9a875 (diff) | |
parent | d1185a8c5dd21182012e6dd531b00fd72f4d30cb (diff) | |
download | lwn-59005b0c59a164101b0273e4bda212c809dc2246.tar.gz lwn-59005b0c59a164101b0273e4bda212c809dc2246.zip |
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.h | 12 |
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 # define __attribute_const__ /* unimplemented */ #endif +#ifndef __designated_init +# define __designated_init +#endif + #ifndef __latent_entropy # define __latent_entropy #endif +#ifndef __randomize_layout +# define __randomize_layout __designated_init +#endif + +#ifndef __no_randomize_layout +# define __no_randomize_layout +#endif + /* * Tell gcc if a function is cold. The compiler will assume any path * directly leading to the call is unlikely. |