Skip to content
Commit b89d82ef authored by Will Deacon's avatar Will Deacon
Browse files

arm64: kpti: Avoid rewriting early page tables when KASLR is enabled



A side effect of commit c55191e9 ("arm64: mm: apply r/o permissions
of VM areas to its linear alias as well") is that the linear map is
created with page granularity, which means that transitioning the early
page table from global to non-global mappings when enabling kpti can
take a significant amount of time during boot.

Given that most CPU implementations do not require kpti, this mainly
impacts KASLR builds where kpti is forcefully enabled. However, in these
situations we know early on that non-global mappings are required and
can avoid the use of global mappings from the beginning. The only gotcha
is Cavium erratum #27456, which we must detect based on the MIDR value
of the boot CPU.

Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent d9ed4196
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment