aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2019-01-24 12:28:37 -0500
committerWill Deacon <will.deacon@arm.com>2019-02-01 09:06:50 -0500
commit132fdc379eb143932d209a20fd581e1ce7630960 (patch)
tree00d48c67640fa2f4a237a327c87704d5b86c9292
parentf17b5f06cb92ef2250513a1e154c47b78df07d40 (diff)
arm64: Do not issue IPIs for user executable ptes
Commit 3b8c9f1cdfc5 ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings") was aimed at fixing the I-cache invalidation for kernel mappings. However, it inadvertently caused all cache maintenance for user mappings via set_pte_at() -> __sync_icache_dcache() -> sync_icache_aliases() to call kick_all_cpus_sync(). Reported-by: Shijith Thotton <sthotton@marvell.com> Tested-by: Shijith Thotton <sthotton@marvell.com> Reported-by: Wandun Chen <chenwandun@huawei.com> Fixes: 3b8c9f1cdfc5 ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings") Cc: <stable@vger.kernel.org> # 4.19.x- Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm64/mm/flush.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
index 30695a868107..5c9073bace83 100644
--- a/arch/arm64/mm/flush.c
+++ b/arch/arm64/mm/flush.c
@@ -33,7 +33,11 @@ void sync_icache_aliases(void *kaddr, unsigned long len)
33 __clean_dcache_area_pou(kaddr, len); 33 __clean_dcache_area_pou(kaddr, len);
34 __flush_icache_all(); 34 __flush_icache_all();
35 } else { 35 } else {
36 flush_icache_range(addr, addr + len); 36 /*
37 * Don't issue kick_all_cpus_sync() after I-cache invalidation
38 * for user mappings.
39 */
40 __flush_icache_range(addr, addr + len);
37 } 41 }
38} 42}
39 43