diff options
author | Will Deacon <will@kernel.org> | 2020-11-20 13:57:48 +0000 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-11-23 16:13:18 +0000 |
commit | ff1712f953e27f0b0718762ec17d0adb15c9fd0b (patch) | |
tree | 1c6478eb4d7c2454a16df7c38f34ef5d4b567ed3 /arch/arm64/include/asm/cacheflush.h | |
parent | 07509e10dcc77627f8b6a57381e878fe269958d3 (diff) |
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: 2f4b829c625e ("arm64: Add support for hardware updates of the access and dirty pte bits")
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20201120143557.6715-3-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/cacheflush.h')
0 files changed, 0 insertions, 0 deletions