Skip to contentSkip to conversation

arm64: Do not issue IPIs for user executable ptes

PATCH New Catalin Marinas 1 participant 1 message Jan 24, 2019

Subsystems (2)
lore
Share & tools
lore

Catalin Marinas

author maintainer
#0 lore raw

PATCH 1/1 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().

Fixes 3b8c9f1cdfc5 ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings")
Cc <[email protected]> # 4.19.x-

---

Hi Will,

You acked the previous inlined patch but I think that's a better option to revert the kernel behaviour w.r.t. user mapping to that prior to commit 3b8c9f1cdfc5.

If you plan a pull request for 5.0-rc4, please pick this up as well.

Thanks.

 arch/arm64/mm/flush.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm64/mm/flush.c +5 -1
index 30695a868107..5c9073bace83 100644
@@ -33,7 +33,11 @@ void sync_icache_aliases(void *kaddr, unsigned long len)
 		__clean_dcache_area_pou(kaddr, len);
 		__flush_icache_all();
 	} else {
-		flush_icache_range(addr, addr + len);
+		/*
+		 * Don't issue kick_all_cpus_sync() after I-cache invalidation
+		 * for user mappings.
+		 */
+		__flush_icache_range(addr, addr + len);
 	}
 }
 

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel