Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: Do not synchronise I and D caches for special ptes

Special pte mappings are not intended to be executable and do not even
have an associated struct page. This patch ensures that we do not call
__sync_icache_dcache() on such ptes.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Steve Capper <Steve.Capper@arm.com>
Tested-by: Laura Abbott <lauraa@codeaurora.org>
Tested-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
Cc: <stable@vger.kernel.org>

+1 -1
+1 -1
arch/arm64/include/asm/pgtable.h
··· 199 199 pte_t *ptep, pte_t pte) 200 200 { 201 201 if (pte_valid_user(pte)) { 202 - if (pte_exec(pte)) 202 + if (!pte_special(pte) && pte_exec(pte)) 203 203 __sync_icache_dcache(pte, addr); 204 204 if (pte_dirty(pte) && pte_write(pte)) 205 205 pte_val(pte) &= ~PTE_RDONLY;