[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221222205511.675832-1-david@redhat.com>
Date: Thu, 22 Dec 2022 21:55:09 +0100
From: David Hildenbrand <david@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org, David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Peter Xu <peterx@...hat.com>,
Muchun Song <muchun.song@...ux.dev>,
Miaohe Lin <linmiaohe@...wei.com>
Subject: [PATCH v1 0/2] mm/hugetlb: uffd-wp fixes for hugetlb_change_protection()
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@...ux-foundation.org>
Cc: Mike Kravetz <mike.kravetz@...cle.com>
Cc: Peter Xu <peterx@...hat.com>
Cc: Muchun Song <muchun.song@...ux.dev>
Cc: Miaohe Lin <linmiaohe@...wei.com>
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
Powered by blists - more mailing lists