]> git.baikalelectronics.ru Git - kernel.git/commit
x86, kaslr: Provide randomness functions
authorKees Cook <keescook@chromium.org>
Fri, 11 Oct 2013 00:18:15 +0000 (17:18 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Sun, 13 Oct 2013 10:12:12 +0000 (03:12 -0700)
commit470600edb720c8354f5bfe168b0c63d1143fd9c6
treeead4a5281554b6f2e0a334cc7e1d83dccf35e15c
parent45e2884d2589b69af72036c1e3d5944ce998dce2
x86, kaslr: Provide randomness functions

Adds potential sources of randomness: RDRAND, RDTSC, or the i8254.

This moves the pre-alternatives inline rdrand function into the header so
both pieces of code can use it. Availability of RDRAND is then controlled
by CONFIG_ARCH_RANDOM, if someone wants to disable it even for kASLR.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/1381450698-28710-4-git-send-email-keescook@chromium.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/boot/compressed/aslr.c
arch/x86/boot/compressed/misc.h
arch/x86/include/asm/archrandom.h
arch/x86/kernel/cpu/rdrand.c