]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kaslr: Set TCR_EL1.NFD1 when CONFIG_RANDOMIZE_BASE=y
authorWill Deacon <will.deacon@arm.com>
Tue, 27 Feb 2018 14:15:49 +0000 (14:15 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 6 Mar 2018 18:52:34 +0000 (18:52 +0000)
commit481b2a2289581b121a93436e9c0dc70b39122cb7
tree87320513202327ecf803cea18a5afe1d366bba1f
parent5477ff8d0264ba8b5b206052fa64ef8d30b1ed6a
arm64: kaslr: Set TCR_EL1.NFD1 when CONFIG_RANDOMIZE_BASE=y

TCR_EL1.NFD1 was allocated by SVE and ensures that fault-surpressing SVE
memory accesses (e.g. speculative accesses from a first-fault gather load)
which translate via TTBR1_EL1 result in a translation fault if they
miss in the TLB when executed from EL0. This mitigates some timing attacks
against KASLR, where the kernel address space could otherwise be probed
efficiently using the FFR in conjunction with suppressed faults on SVE
loads.

Cc: Dave Martin <Dave.Martin@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/pgtable-hwdef.h
arch/arm64/mm/proc.S