]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Make sure permission updates happen for pmd/pud
authorLaura Abbott <labbott@redhat.com>
Wed, 23 May 2018 18:43:46 +0000 (11:43 -0700)
committerWill Deacon <will.deacon@arm.com>
Thu, 24 May 2018 10:19:31 +0000 (11:19 +0100)
commit3d3c503b83ab93a7d99b17ef348bfad26d3d68c6
treed297bd7683ea4fd6d5e2415f525754628d697c43
parentf0646b0da5cfc3380900450fad9462ab5e6165f6
arm64: Make sure permission updates happen for pmd/pud

Commit 8d7642e4a442 ("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: Kees Cook <keescook@chromium.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reported-by: Peter Robinson <pbrobinson@gmail.com>
Fixes: 8d7642e4a442 ("arm64: Enforce BBM for huge IO/VMAP mappings")
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/mmu.c