]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Enforce BBM for huge IO/VMAP mappings
authorWill Deacon <will.deacon@arm.com>
Wed, 21 Feb 2018 12:59:27 +0000 (12:59 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 22 Feb 2018 11:25:53 +0000 (11:25 +0000)
commit8d7642e4a44214e1638e754d4338333dbb096054
tree930c790bb615babec3527f85fdbbec6628cf938d
parent2379d3fe6337560b8bb5a3e597cec3bb5db92ee9
arm64: Enforce BBM for huge IO/VMAP mappings

ioremap_page_range doesn't honour break-before-make and attempts to put
down huge mappings (using p*d_set_huge) over the top of pre-existing
table entries. This leads to us leaking page table memory and also gives
rise to TLB conflicts and spurious aborts, which have been seen in
practice on Cortex-A75.

Until this has been resolved, refuse to put block mappings when the
existing entry is found to be present.

Fixes: 82629d12e8c08 ("arm64: add support for ioremap() block mappings")
Reported-by: Hanjun Guo <hanjun.guo@linaro.org>
Reported-by: Lei Li <lious.lilei@hisilicon.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/mmu.c