]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Revert "arm64: mm: set the contiguous bit for kernel mappings where appropriate"
authorMark Rutland <mark.rutland@arm.com>
Thu, 23 Feb 2017 16:22:55 +0000 (16:22 +0000)
committerWill Deacon <will.deacon@arm.com>
Fri, 24 Feb 2017 10:55:42 +0000 (10:55 +0000)
commitd81bbe6d882461dec4b71dbe2aa85565fcca4187
tree26b08f3d71897d1f7dc12e6d2aefb799b3f22a5f
parentea6eac904f0a5a0c223bcfb133ec880ba9c70ae3
Revert "arm64: mm: set the contiguous bit for kernel mappings where appropriate"

This reverts commit 0bfc445dec9dd8130d22c9f4476eed7598524129.

When we change the permissions of regions mapped using contiguous
entries, the architecture requires us to follow a Break-Before-Make
strategy, breaking *all* associated entries before we can change any of
the following properties from the entries:

 - presence of the contiguous bit
 - output address
 - attributes
 - permissiones

Failure to do so can result in a number of problems (e.g. TLB conflict
aborts and/or erroneous results from TLB lookups).

See ARM DDI 0487A.k_iss10775, "Misprogramming of the Contiguous bit",
page D4-1762.

We do not take this into account when altering the permissions of kernel
segments in mark_rodata_ro(), where we change the permissions of live
contiguous entires one-by-one, leaving them transiently inconsistent.
This has been observed to result in failures on some fast model
configurations.

Unfortunately, we cannot follow Break-Before-Make here as we'd have to
unmap kernel text and data used to perform the sequence.

For the timebeing, revert commit 0bfc445dec9dd813 so as to avoid issues
resulting from this misuse of the contiguous bit.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <Will.Deacon@arm.com>
Cc: stable@vger.kernel.org # v4.10
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/mmu.c