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

Commit 7b6859cf authored by Matt Wagantall's avatar Matt Wagantall
Browse files

arm64: dma-mapping: fix attribs for non-coherent strongly-ordered mappings



An incorrect conflict resolution when picking up 07c17f4e ("arm64:
add support for NO_KERNEL_MAPPING and STRONGLY_ORDERED") caused
MT_NORMAL_NC attributes being set for strongly-ordered mappings, rather
than MT_DEVICE_nGnRnE attributes.

As a result of this, speculative data fetches of the incorrectly-
mapped memory have been observed. In cases where this memory is
XPU protected or reads result in side-effects, this may result in
device crashes.

Fix this by setting the attributes returned by pgprot_noncached()
regardless of the value of the coherent flag passed to
__get_dma_pgprot()

Change-Id: Iec56027e280ae0920016df3066045b71299a915b
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent fb120d64
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment