public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Ives van Hoorne <ives@codesandbox.io>,
	stable@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hugh@veritas.com>,
	Alistair Popple <apopple@nvidia.com>,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	Nadav Amit <nadav.amit@gmail.com>,
	Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: [PATCH v1] mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a VMA
Date: Fri, 9 Dec 2022 09:07:44 +0100	[thread overview]
Message-ID: <6209d614-b1f2-4501-6b8a-6d4095c309eb@redhat.com> (raw)
In-Reply-To: <Y5JHY2zyK4k8aBtX@x1n>

On 08.12.22 21:21, Peter Xu wrote:
> On Thu, Dec 08, 2022 at 03:06:06PM -0500, Peter Xu wrote:
>> On Thu, Dec 08, 2022 at 05:44:35PM +0100, David Hildenbrand wrote:
>>> I'll wait for some more (+retest) before I resend tomorrow.
>>
>> One more thing just to double check:
>>
>> It's 6a56ccbcf6c6 ("mm/autonuma: use can_change_(pte|pmd)_writable() to
>> replace savedwrite", 2022-11-30) that just started to break uffd-wp on
>> numa, am I right?
>>
>> With the old code, pte_modify() will persist uffd-wp bit, afaict, and we
>> used to do savedwrite for numa hints.  That all look correct to me until
>> the savedwrite removal patchset with/without vm_page_prot changes.
>>
>> If that's the case, we'd better also mention that in the commit message and
>> has another Fixes: for that one to be clear.
> 
> Nah, never mind.  I think the savedwrite will not guarantee pte write
> protected just like the migration path.  The commit message is correct.

Right, the problem is not the uffd-wp bit getting lost, but the write 
bit getting set, which is independent of 6a56ccbcf6c6. Thanks for 
double-checking 6a56ccbcf6c6.

-- 
Thanks,

David / dhildenb


      reply	other threads:[~2022-12-09  8:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 11:41 [PATCH v1] mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a VMA David Hildenbrand
2022-12-08 11:45 ` David Hildenbrand
2022-12-08 11:46   ` David Hildenbrand
2022-12-08 16:29 ` Peter Xu
2022-12-08 16:44   ` David Hildenbrand
2022-12-08 20:06     ` Peter Xu
2022-12-08 20:21       ` Peter Xu
2022-12-09  8:07         ` David Hildenbrand [this message]

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=6209d614-b1f2-4501-6b8a-6d4095c309eb@redhat.com \
    --to=david@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=hugh@veritas.com \
    --cc=ives@codesandbox.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nadav.amit@gmail.com \
    --cc=peterx@redhat.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=stable@vger.kernel.org \
    /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