From: Peter Xu <peterx@redhat.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: David CARLIER <devnexen@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@kernel.org>,
Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: [PATCH v4] mm/userfaultfd: detect VMA replacement after copy retry in mfill_copy_folio_retry()
Date: Mon, 13 Apr 2026 08:53:03 -0400 [thread overview]
Message-ID: <adznL0B3vCSBoL7h@x1.local> (raw)
In-Reply-To: <adu-ScPEF5saZekk@kernel.org>
On Sun, Apr 12, 2026 at 06:46:17PM +0300, Mike Rapoport wrote:
> > Personally this is least of a concern to me. Hugetlbfs is so specially
> > managed in userapps, so it is even less likely to trigger the same bug with
> > VM_SOFTDIRTY changes or other ways.
>
> I'm not sure I follow you here. How changes of VM_SOFTDIRTY can crash the
> kernel in UFFDIO_COPY?
It was confusing indeed that I used as example, sorry. SOFTDIRTY only case
isn't a bug, even if it'll also be captured by "vma changes" when we detect
that.
I just wanted to say I concerned much less on arbitrary hugetlbfs vmas
appearing than most of the rest, where it can crash the kernel even after
the change (e.g. mapped one shmem inode, remapped to another different
shmem inode, or SHARED->PRIVATE, as others pointed out elsewhere).
>
> > Again, I'm open to any suggestion on replacing the vma snapshot logic as
> > long as all possible issues got reported will be properly fixed, especially
> > in the latest mainline. I don't worry much on backporting yet; if this bug
> > existed for 10 years and nobody yet reported, to me we can always evaluate
> > the effort to backport or skip. However, a proper fix in mainline is IMHO
> > more important.
>
> Totally agree, a fix in mainline is much more important than backporting.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2026-04-13 12:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 13:41 David Carlier
2026-04-01 3:01 ` Andrew Morton
2026-04-01 7:49 ` Mike Rapoport
2026-04-01 8:06 ` David CARLIER
2026-04-01 15:23 ` Peter Xu
2026-04-01 18:34 ` David CARLIER
2026-04-01 19:22 ` Peter Xu
2026-04-01 20:05 ` David CARLIER
2026-04-02 4:02 ` Mike Rapoport
2026-04-02 5:59 ` David CARLIER
2026-04-02 13:29 ` Peter Xu
2026-04-09 11:20 ` Mike Rapoport
2026-04-10 15:10 ` Peter Xu
2026-04-02 3:58 ` Mike Rapoport
2026-04-02 13:42 ` Peter Xu
2026-04-09 11:31 ` Mike Rapoport
2026-04-10 15:26 ` Peter Xu
2026-04-12 15:46 ` Mike Rapoport
2026-04-13 12:53 ` Peter Xu [this message]
2026-04-07 10:17 ` Lorenzo Stoakes (Oracle)
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=adznL0B3vCSBoL7h@x1.local \
--to=peterx@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=devnexen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=rppt@kernel.org \
--cc=vbabka@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