gcc-plugins: Add latent_entropy plugin
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. The need for very-early boot entropy tends to be very architecture or system design specific, so this plugin is more suited for those sorts of special cases. The existing kernel RNG already attempts to extract entropy from reliable runtime variation, but this plugin takes the idea to a logical extreme by permuting a global variable based on any variation in code execution (e.g. a different value (and permutation function) is used to permute the global based on loop count, case statement, if/then/else bra...
Showing
- arch/Kconfig 18 additions, 0 deletionsarch/Kconfig
- arch/powerpc/kernel/Makefile 5 additions, 0 deletionsarch/powerpc/kernel/Makefile
- include/linux/random.h 11 additions, 0 deletionsinclude/linux/random.h
- init/main.c 1 addition, 0 deletionsinit/main.c
- kernel/fork.c 1 addition, 0 deletionskernel/fork.c
- mm/page_alloc.c 5 additions, 0 deletionsmm/page_alloc.c
- scripts/Makefile.gcc-plugins 8 additions, 1 deletionscripts/Makefile.gcc-plugins
- scripts/gcc-plugins/latent_entropy_plugin.c 640 additions, 0 deletionsscripts/gcc-plugins/latent_entropy_plugin.c
Please register or sign in to comment