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

Skip to content
Commit be0f8a7a authored by Laura Abbott's avatar Laura Abbott Committed by Gerrit - the friendly Code Review server
Browse files

arm64: Make sure permission updates happen for pmd/pud



Commit 15122ee2c515 ("arm64: Enforce BBM for huge IO/VMAP mappings")
disallowed block mappings for ioremap since that code does not honor
break-before-make. The same APIs are also used for permission updating
though and the extra checks prevent the permission updates from happening,
even though this should be permitted. This results in read-only permissions
not being fully applied. Visibly, this can occasionaly be seen as a failure
on the built in rodata test when the test data ends up in a section or
as an odd RW gap on the page table dump. Fix this by using
pgattr_change_is_safe instead of p*d_present for determining if the
change is permitted.

Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Tested-by: default avatarPeter Robinson <pbrobinson@gmail.com>
Reported-by: default avatarPeter Robinson <pbrobinson@gmail.com>
Fixes: 15122ee2c515 ("arm64: Enforce BBM for huge IO/VMAP mappings")
Signed-off-by: default avatarLaura Abbott <labbott@redhat.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Git-Commit: 82034c23fcbc2389c73d97737f61fa2dd6526413
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Change-Id: I7cbc0366b5101ade51a527b4c9e72f0a39ea5246
[sudaraja@codeaurora.org: added definition for pfn_pud, merge conflict fixes]
Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
[guptap@codeaurora.org: added definition for pgattr_change_is_safe, merge conflict fixes]
Signed-off-by: default avatarPrakash Gupta <guptap@codeaurora.org>
parent 43f041e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment