]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kaslr: randomize the linear region
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 29 Jan 2016 10:59:03 +0000 (11:59 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 24 Feb 2016 14:57:27 +0000 (14:57 +0000)
commit448052a955ffbe06305f2fabf331bf64858ff65d
tree194b08753fc4dc09977fed71eccfcee48e66f412
parent3b6fc70b4cced9fc3019359c54b3eb3c5e36b7ec
arm64: kaslr: randomize the linear region

When KASLR is enabled (CONFIG_RANDOMIZE_BASE=y), and entropy has been
provided by the bootloader, randomize the placement of RAM inside the
linear region if sufficient space is available. For instance, on a 4KB
granule/3 levels kernel, the linear region is 256 GB in size, and we can
choose any 1 GB aligned offset that is far enough from the top of the
address space to fit the distance between the start of the lowest memblock
and the top of the highest memblock.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/kaslr.c
arch/arm64/mm/init.c