Merge tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Oct 2016 17:03:15 +0000 (10:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Oct 2016 17:03:15 +0000 (10:03 -0700)
Pull gcc plugins update from Kees Cook:
 "This adds a new gcc plugin named "latent_entropy". It is designed to
  extract as much possible uncertainty from a running system at boot
  time as possible, hoping to capitalize on any possible variation in
  CPU operation (due to runtime data differences, hardware differences,
  SMP ordering, thermal timing variation, cache behavior, etc).

  At the very least, this plugin is a much more comprehensive example
  for how to manipulate kernel code using the gcc plugin internals"

* tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  latent_entropy: Mark functions with __latent_entropy
  gcc-plugins: Add latent_entropy plugin

17 files changed:
1  2 
arch/Kconfig
arch/powerpc/kernel/Makefile
block/blk-softirq.c
drivers/char/random.c
fs/namespace.c
include/linux/compiler.h
include/linux/fdtable.h
include/linux/init.h
include/linux/random.h
kernel/fork.c
kernel/rcu/tree.c
kernel/sched/fair.c
kernel/softirq.c
lib/irq_poll.c
lib/random32.c
mm/page_alloc.c
net/core/dev.c

diff --cc arch/Kconfig
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/namespace.c
Simple merge
Simple merge
Simple merge
@@@ -39,9 -39,9 +39,9 @@@
  
  /* These are for everybody (although not all archs will actually
     discard it in modules) */
- #define __init                __section(.init.text) __cold notrace
+ #define __init                __section(.init.text) __cold notrace __latent_entropy
  #define __initdata    __section(.init.data)
 -#define __initconst   __constsection(.init.rodata)
 +#define __initconst   __section(.init.rodata)
  #define __exitdata    __section(.exit.data)
  #define __exit_call   __used __section(.exitcall.exit)
  
  #define __exit          __section(.exit.text) __exitused __cold notrace
  
  /* Used for MEMORY_HOTPLUG */
- #define __meminit        __section(.meminit.text) __cold notrace
+ #define __meminit        __section(.meminit.text) __cold notrace \
+                                                 __latent_entropy
  #define __meminitdata    __section(.meminit.data)
 -#define __meminitconst   __constsection(.meminit.rodata)
 +#define __meminitconst   __section(.meminit.rodata)
  #define __memexit        __section(.memexit.text) __exitused __cold notrace
  #define __memexitdata    __section(.memexit.data)
 -#define __memexitconst   __constsection(.memexit.rodata)
 +#define __memexitconst   __section(.memexit.rodata)
  
  /* For assembly routines */
  #define __HEAD                .section        ".head.text","ax"
Simple merge
diff --cc kernel/fork.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc lib/irq_poll.c
Simple merge
diff --cc lib/random32.c
Simple merge
diff --cc mm/page_alloc.c
Simple merge
diff --cc net/core/dev.c
Simple merge