arm64: Move PTE_RDONLY bit handling out of set_pte_at()
Currently PTE_RDONLY is treated as a hardware only bit and not handled by the pte_mkwrite(), pte_wrprotect() or the user PAGE_* definitions. The set_pte_at() function is responsible for setting this bit based on the write permission or dirty state. This patch moves the PTE_RDONLY handling out of set_pte_at into the pte_mkwrite()/pte_wrprotect() functions. The PAGE_* definitions to need to be updated to explicitly include PTE_RDONLY when !PTE_WRITE. The patch also removes the redundant PAGE_COPY(_EXEC) definitions as they are identical to the corresponding PAGE_READONLY(_EXEC). Reviewed-by:Will Deacon <will.deacon@arm.com> Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
Showing
- arch/arm64/include/asm/pgtable-prot.h 8 additions, 10 deletionsarch/arm64/include/asm/pgtable-prot.h
- arch/arm64/include/asm/pgtable.h 10 additions, 24 deletionsarch/arm64/include/asm/pgtable.h
- arch/arm64/kernel/hibernate.c 2 additions, 2 deletionsarch/arm64/kernel/hibernate.c
- arch/arm64/mm/fault.c 1 addition, 5 deletionsarch/arm64/mm/fault.c
Loading
Please register or sign in to comment