]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit7dde6110245fab09a87e365d4aaba90c6cce36ec
tree56dda033d400b63390b777fb60113d96225eeca6
parent603338be9b0777d6994b0be77e23d45e712ac376
arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region

BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit c8a43c18a97845e7f94ed7d181c11f41964976a2 ]

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>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/mm/init.c