Re: [PATCH 2/6] arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()

2020-11-23 Thread Catalin Marinas
On Fri, Nov 20, 2020 at 09:09:03AM -0800, Minchan Kim wrote: > On Fri, Nov 20, 2020 at 02:35:53PM +, Will Deacon wrote: > > 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 l

Re: [PATCH 2/6] arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()

2020-11-23 Thread Catalin Marinas
On Fri, Nov 20, 2020 at 02:35:53PM +, Will Deacon wrote: > 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. My assumption at the time was that the caller of pte_wrprotect() already moved the 'd

Re: [PATCH 2/6] arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()

2020-11-20 Thread Minchan Kim
On Fri, Nov 20, 2020 at 02:35:53PM +, Will Deacon wrote: > 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 > th

[PATCH 2/6] arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()

2020-11-20 Thread Will Deacon
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