From: David Hildenbrand <david@redhat.com>
To: peterx@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Muhammad Usama Anjum <usama.anjum@collabora.com>
Subject: Re: [PATCH] mm/memory: Fix missing pte marker for !page on pte zaps
Date: Wed, 13 Mar 2024 23:26:22 +0100 [thread overview]
Message-ID: <ce552774-d02a-4408-b0f3-2ad94ff36e42@redhat.com> (raw)
In-Reply-To: <c04c81bc-dfc1-4dd6-972c-23c2eb8a5d0d@redhat.com>
On 13.03.24 23:03, David Hildenbrand wrote:
> On 13.03.24 22:31, peterx@redhat.com wrote:
>> From: Peter Xu <peterx@redhat.com>
>>
>> Commit 0cf18e839f64 of large folio zap work broke uffd-wp. Now mm's uffd
>> unit test "wp-unpopulated" will trigger this WARN_ON_ONCE().
>
> Good that I added the 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.
>
> Are you sure? zap_install_uffd_wp_if_needed() contains right at the start:
>
> /* Zap on anonymous always means dropping everything */
> if (vma_is_anonymous(vma))
> return;
>
> So if that's the case the unit test triggers, I'm confused.
Ah, got it. It's not that we have to place a marker, just that it can
happen. Of course it can. All makes sense.
Thanks!
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2024-03-13 22:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 21:31 peterx
2024-03-13 22:03 ` David Hildenbrand
2024-03-13 22:26 ` David Hildenbrand [this message]
2024-03-13 22:26 ` Peter Xu
2024-03-13 22:29 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce552774-d02a-4408-b0f3-2ad94ff36e42@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=usama.anjum@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox