Skip to content

Commit

Permalink
arm64: Do not issue IPIs for user executable ptes
Browse files Browse the repository at this point in the history
Commit 3b8c9f1 ("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 <[email protected]>
Tested-by: Shijith Thotton <[email protected]>
Reported-by: Wandun Chen <[email protected]>
Fixes: 3b8c9f1 ("arm64: IPI each CPU after invalidating the I-cache for kernel mappings")
Cc: <[email protected]> # 4.19.x-
Signed-off-by: Catalin Marinas <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
ctmarinas authored and wildea01 committed Feb 1, 2019
1 parent f17b5f0 commit 132fdc3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/arm64/mm/flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 132fdc3

Please sign in to comment.