Re: [PATCH v3 1/3] mm/migrate_device.c: Flush TLB while holding PTL

2022-08-25 Thread Huang, Ying
Alistair Popple writes: > "Huang, Ying" writes: > >> Alistair Popple writes: >> >>> When clearing a PTE the TLB should be flushed whilst still holding the >>> PTL to avoid a potential race with madvise/munmap/etc. For example >>> consider the following sequence: >>> >>> CPU0

Re: [PATCH v3 1/3] mm/migrate_device.c: Flush TLB while holding PTL

2022-08-25 Thread Alistair Popple
"Huang, Ying" writes: > Alistair Popple writes: > >> When clearing a PTE the TLB should be flushed whilst still holding the >> PTL to avoid a potential race with madvise/munmap/etc. For example >> consider the following sequence: >> >> CPU0 CPU1 >>

Re: [PATCH v3 1/3] mm/migrate_device.c: Flush TLB while holding PTL

2022-08-24 Thread Huang, Ying
Alistair Popple writes: > When clearing a PTE the TLB should be flushed whilst still holding the > PTL to avoid a potential race with madvise/munmap/etc. For example > consider the following sequence: > > CPU0 CPU1 > > > migrate_vm

Re: [PATCH v3 1/3] mm/migrate_device.c: Flush TLB while holding PTL

2022-08-24 Thread David Hildenbrand
On 24.08.22 14:26, Alistair Popple wrote: > > David Hildenbrand writes: > >> On 24.08.22 05:03, Alistair Popple wrote: >>> When clearing a PTE the TLB should be flushed whilst still holding the >>> PTL to avoid a potential race with madvise/munmap/etc. For example >>> consider the following sequ

Re: [PATCH v3 1/3] mm/migrate_device.c: Flush TLB while holding PTL

2022-08-24 Thread Alistair Popple
David Hildenbrand writes: > On 24.08.22 05:03, Alistair Popple wrote: >> When clearing a PTE the TLB should be flushed whilst still holding the >> PTL to avoid a potential race with madvise/munmap/etc. For example >> consider the following sequence: >> >> CPU0 CPU1 >>

Re: [PATCH v3 1/3] mm/migrate_device.c: Flush TLB while holding PTL

2022-08-24 Thread David Hildenbrand
On 24.08.22 05:03, Alistair Popple wrote: > When clearing a PTE the TLB should be flushed whilst still holding the > PTL to avoid a potential race with madvise/munmap/etc. For example > consider the following sequence: > > CPU0 CPU1 >

[PATCH v3 1/3] mm/migrate_device.c: Flush TLB while holding PTL

2022-08-23 Thread Alistair Popple
When clearing a PTE the TLB should be flushed whilst still holding the PTL to avoid a potential race with madvise/munmap/etc. For example consider the following sequence: CPU0 CPU1 migrate_vma_collect_pmd() pte_unmap_unlock()