summaryrefslogtreecommitdiff
path: root/tools/time
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2024-03-13 17:31:07 -0400
committerAndrew Morton <akpm@linux-foundation.org>2024-03-26 11:07:19 -0700
commitf8572367eaff6739e3bc238ba93b86cd7881c0ff (patch)
treeb95652c2e8edb7be298c8b7f42e86acb87b51466 /tools/time
parent4cece764965020c22cff7665b18a012006359095 (diff)
mm/memory: fix missing pte marker for !page on pte zaps
Commit 0cf18e839f64 of large folio zap work broke uffd-wp. Now mm's uffd unit test "wp-unpopulated" will trigger this WARN_ON_ONCE(). The WARN_ON_ONCE() asserts that an VMA cannot be registered with userfaultfd-wp if it contains a !normal page, but it's actually possible. One example is an anonymous vma, register with uffd-wp, read anything will install a zero page. Then when zap on it, this should trigger. What's more, removing that WARN_ON_ONCE may not be enough either, because we should also not rely on "whether it's a normal page" to decide whether pte marker is needed. For example, one can register wr-protect over some DAX regions to track writes when UFFD_FEATURE_WP_ASYNC enabled, in which case it can have page==NULL for a devmap but we may want to keep the marker around. Link: https://lkml.kernel.org/r/20240313213107.235067-1-peterx@redhat.com Fixes: 0cf18e839f64 ("mm/memory: handle !page case in zap_present_pte() separately") Signed-off-by: Peter Xu <peterx@redhat.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/time')
0 files changed, 0 insertions, 0 deletions