latent_entropy: Mark functions with __latent_entropy
The __latent_entropy gcc attribute can be used only on functions and variables. If it is on a function then the plugin will instrument it for gathering control-flow entropy. If the attribute is on a variable then the plugin will initialize it with random contents. The variable must be an integer, an integer array type or a structure with integer fields. These specific functions have been selected because they are init functions (to help gather boot-time entropy), are called at unpredictable times, or they have variable loops, each of which provide some level of latent entropy. Signed-off-by:Emese Revfy <re.emese@gmail.com> [kees: expanded commit message] Signed-off-by:
Kees Cook <keescook@chromium.org>
Showing
- block/blk-softirq.c 1 addition, 1 deletionblock/blk-softirq.c
- drivers/char/random.c 2 additions, 2 deletionsdrivers/char/random.c
- fs/namespace.c 1 addition, 0 deletionsfs/namespace.c
- include/linux/compiler-gcc.h 7 additions, 0 deletionsinclude/linux/compiler-gcc.h
- include/linux/compiler.h 4 additions, 0 deletionsinclude/linux/compiler.h
- include/linux/fdtable.h 1 addition, 1 deletioninclude/linux/fdtable.h
- include/linux/genhd.h 1 addition, 1 deletioninclude/linux/genhd.h
- include/linux/init.h 3 additions, 2 deletionsinclude/linux/init.h
- include/linux/random.h 2 additions, 2 deletionsinclude/linux/random.h
- kernel/fork.c 4 additions, 2 deletionskernel/fork.c
- kernel/rcu/tiny.c 1 addition, 1 deletionkernel/rcu/tiny.c
- kernel/rcu/tree.c 1 addition, 1 deletionkernel/rcu/tree.c
- kernel/sched/fair.c 1 addition, 1 deletionkernel/sched/fair.c
- kernel/softirq.c 2 additions, 2 deletionskernel/softirq.c
- kernel/time/timer.c 1 addition, 1 deletionkernel/time/timer.c
- lib/irq_poll.c 1 addition, 1 deletionlib/irq_poll.c
- lib/random32.c 1 addition, 1 deletionlib/random32.c
- mm/page_alloc.c 1 addition, 1 deletionmm/page_alloc.c
- net/core/dev.c 2 additions, 2 deletionsnet/core/dev.c
Loading
Please register or sign in to comment