Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de2db743 authored by Catalin Marinas's avatar Catalin Marinas
Browse files

arm64: Make DMA coherent and strongly ordered mappings not executable



pgprot_{dmacoherent,writecombine,noncached} don't need to generate
executable mappings with side-effects like __sync_icache_dcache() being
called when the mapping is in user space.

Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Reported-by: default avatarBharat Bhushan <Bharat.Bhushan@freescale.com>
Tested-by: default avatarLaura Abbott <lauraa@codeaurora.org>
Tested-by: default avatarBharat Bhushan <Bharat.Bhushan@freescale.com>
Cc: <stable@vger.kernel.org>
parent d152d22a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -286,11 +286,11 @@ static inline int has_transparent_hugepage(void)
 * Mark the prot value as uncacheable and unbufferable.
 */
#define pgprot_noncached(prot) \
	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE))
	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
#define pgprot_writecombine(prot) \
	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
#define pgprot_dmacoherent(prot) \
	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
	__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
#define __HAVE_PHYS_MEM_ACCESS_PROT
struct file;
extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,