]> git.baikalelectronics.ru Git - kernel.git/commit
x86, kaslr: Select random position from e820 maps
authorKees Cook <keescook@chromium.org>
Fri, 11 Oct 2013 00:18:16 +0000 (17:18 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Sun, 13 Oct 2013 10:12:19 +0000 (03:12 -0700)
commite3087a6b355a9ca8c1364300d62836e2d9187149
treef9a1ba0cd4670beaa0f5b146a979d9dda0165f1c
parent470600edb720c8354f5bfe168b0c63d1143fd9c6
x86, kaslr: Select random position from e820 maps

Counts available alignment positions across all e820 maps, and chooses
one randomly for the new kernel base address, making sure not to collide
with unsafe memory areas.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/1381450698-28710-5-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.c
arch/x86/boot/compressed/misc.h