From: James Houghton <jthoughton@google.com>
To: akpm@linux-foundation.org
Cc: baohua@kernel.org, baolin.wang@linux.alibaba.com,
david@kernel.org, dev.jain@arm.com, hughd@google.com,
jthoughton@google.com, kas@kernel.org, lance.yang@linux.dev,
liam@infradead.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, ljs@kernel.org, nico.pache@linux.dev,
ryan.roberts@arm.com, shy828301@gmail.com, usama.arif@linux.dev,
ziy@nvidia.com, zokeefe@google.com
Subject: Re: [PATCH v3 1/2] mm/khugepaged: Never install PMDs in uffd-minor-registered VMAs
Date: Fri, 11 Sep 2026 00:02:58 +0000 [thread overview]
Message-ID: <20260911000300.1052582-1-jthoughton@google.com> (raw)
In-Reply-To: <20260910162411.d3bd211927c10e049c6652b8@linux-foundation.org>
On Thu, Sep 10, 2026 at 4:24 PM Andrew Morton <akpm@linux-foundation.org> wrote:
> Sashiko had a stupid niggle about the selftest change and made quite
> disturbing claims about the existing try_collapse_pte_mapped_thp() code:
>
> https://sashiko.dev/#/patchset/20260910023411.514987-1-jthoughton@google.com
Thanks, it looks like the note it wrote about the selftest is genuine; it is
okay for MADV_COLLAPSE to fail. So I shouldn't have changed uffd_test_skip() to
uffd_test_fail().
Andrew, if you can, please add this diff as part of the patch to queue. (It's
a partial revert.) Or I could send the a new version of the patch as a reply
to patch #2 email. Or a whole v4, whatever's easiest.
diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c
index 6f2360f9b75d..d8e40b770d88 100644
--- a/tools/testing/selftests/mm/uffd-unit-tests.c
+++ b/tools/testing/selftests/mm/uffd-unit-tests.c
@@ -639,7 +639,8 @@ static void uffd_minor_test_common(uffd_global_test_opts_t *gopts, bool test_col
/* MADV_COLLAPSE should succeed with userfaultfd unregistered. */
if (madvise(gopts->area_dst_alias, gopts->nr_pages * gopts->page_size,
MADV_COLLAPSE)) {
- uffd_test_fail("MADV_COLLAPSE failed");
+ /* It's fine to fail for this one... */
+ uffd_test_skip("MADV_COLLAPSE failed");
return;
}
With respect to the note about try_collapse_pte_mapped_thp() breaking POSIX
SIGBUS semantics, it definitely seems plausible. I'll look into it.
> I'll queue the series for test-n-review.
Thanks!
next prev parent reply other threads:[~2026-09-11 0:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 2:34 [PATCH v3 1/2] mm/khugepaged: Never install PMDs in uffd-minor-registered VMAs James Houghton
2026-09-10 2:34 ` [PATCH v3 2/2] mm: selftests: Adjust the MADV_COLLAPSE uffd-minor selftests James Houghton
2026-09-10 23:24 ` [PATCH v3 1/2] mm/khugepaged: Never install PMDs in uffd-minor-registered VMAs Andrew Morton
2026-09-11 0:02 ` James Houghton [this message]
2026-09-11 0:06 ` James Houghton
2026-09-11 0:57 ` James Houghton
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=20260911000300.1052582-1-jthoughton@google.com \
--to=jthoughton@google.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=hughd@google.com \
--cc=kas@kernel.org \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=nico.pache@linux.dev \
--cc=ryan.roberts@arm.com \
--cc=shy828301@gmail.com \
--cc=usama.arif@linux.dev \
--cc=ziy@nvidia.com \
--cc=zokeefe@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.