]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
arm64: fix R/O permissions of FDT mapping
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 9 Nov 2015 08:55:46 +0000 (09:55 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 9 Nov 2015 14:26:36 +0000 (14:26 +0000)
commitfb226c3d7c77b4f99cee675795cc0e70937c56ee
tree08f88c1b14952e03fdf797f0ec233923463cfa56
parentb219545e9646e9d4089a74029c82ae59645e12ae
arm64: fix R/O permissions of FDT mapping

The mapping permissions of the FDT are set to 'PAGE_KERNEL | PTE_RDONLY'
in an attempt to map the FDT as read-only. However, not only does this
break at build time under STRICT_MM_TYPECHECKS (since the two terms are
of different types in that case), it also results in both the PTE_WRITE
and PTE_RDONLY attributes to be set, which means the region is still
writable under ARMv8.1 DBM (and an attempted write will simply clear the
PT_RDONLY bit).

So instead, define PAGE_KERNEL_RO (which already has an established
meaning across architectures) and use that instead.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable.h
arch/arm64/mm/mmu.c