]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region
authorYueyi Li <liyueyi@live.com>
Mon, 24 Dec 2018 07:40:07 +0000 (07:40 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 3 Jan 2019 18:03:54 +0000 (18:03 +0000)
commit9e18e731abb5d5f897f59e3236f41ccdaaac3b0c
tree14356b37f98932e6fe44a0befaa184d1734442be
parent6a5cfc3d6f5182ba66ae3387e88a048619656571
arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region

When KASLR is enabled (CONFIG_RANDOMIZE_BASE=y), the top 4K of kernel
virtual address space may be mapped to physical addresses despite being
reserved for ERR_PTR values.

Fix the randomization of the linear region so that we avoid mapping the
last page of the virtual address space.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: liyueyi <liyueyi@live.com>
[will: rewrote commit message; merged in suggestion from Ard]
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/init.c