Skip to content
Snippets Groups Projects
Commit ff1712f9 authored by Will Deacon's avatar Will Deacon
Browse files

arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()


With hardware dirty bit management, calling pte_wrprotect() on a writable,
dirty PTE will lose the dirty state and return a read-only, clean entry.

Move the logic from ptep_set_wrprotect() into pte_wrprotect() to ensure that
the dirty bit is preserved for writable entries, as this is required for
soft-dirty bit management if we enable it in the future.

Cc: <stable@vger.kernel.org>
Fixes: 2f4b829c ("arm64: Add support for hardware updates of the access and dirty pte bits")
Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20201120143557.6715-3-will@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 07509e10
No related branches found
No related tags found
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