[PATCH v1 0/2] mm/hugetlb: uffd-wp fixes for hugetlb_change_protection()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Playing with virtio-mem and background snapshots (using uffd-wp) on
hugetlb in QEMU, I managed to trigger a VM_BUG_ON(). Looking into the
details, hugetlb_change_protection() seems to not handle uffd-wp correctly
in all cases.

Patch #1 fixes my test case. I don't have reproducers for patch #2, as
it requires running into migration entries.

I did not yet check in detail yet if !hugetlb code requires similar care.

Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Cc: Peter Xu <peterx@xxxxxxxxxx>
Cc: Muchun Song <muchun.song@xxxxxxxxx>
Cc: Miaohe Lin <linmiaohe@xxxxxxxxxx>

David Hildenbrand (2):
  mm/hugetlb: fix PTE marker handling in hugetlb_change_protection()
  mm/hugetlb: fix uffd-wp handling for migration entries in
    hugetlb_change_protection()

 mm/hugetlb.c | 38 ++++++++++++++++----------------------
 1 file changed, 16 insertions(+), 22 deletions(-)

-- 
2.38.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux