mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
arm64: Do not synchronise I and D caches for special ptes
commit71fdb6bf61upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commitb1f2bfc9d8) Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
committed by
Mark Brown
parent
226b19b9d3
commit
5aab0869c9
@@ -161,7 +161,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t pte)
|
||||
{
|
||||
if (pte_valid_user(pte)) {
|
||||
if (pte_exec(pte))
|
||||
if (!pte_special(pte) && pte_exec(pte))
|
||||
__sync_icache_dcache(pte, addr);
|
||||
if (!pte_dirty(pte))
|
||||
pte = pte_wrprotect(pte);
|
||||
|
||||
Reference in New Issue
Block a user