Re: [PATCH v3 25/28] userfaultfd: wp: fixup swap entries in change_pte_range

2019-04-18 Thread Jerome Glisse
On Wed, Mar 20, 2019 at 10:06:39AM +0800, Peter Xu wrote: > In change_pte_range() we do nothing for uffd if the PTE is a swap > entry. That can lead to data mismatch if the page that we are going > to write protect is swapped out when sending the UFFDIO_WRITEPROTECT. > This patch applies/removes t

[PATCH v3 25/28] userfaultfd: wp: fixup swap entries in change_pte_range

2019-03-19 Thread Peter Xu
In change_pte_range() we do nothing for uffd if the PTE is a swap entry. That can lead to data mismatch if the page that we are going to write protect is swapped out when sending the UFFDIO_WRITEPROTECT. This patch applies/removes the uffd-wp bit even for the swap entries. Signed-off-by: Peter Xu