mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>, Peter Xu <peterx@redhat.com>,
	 Suren Baghdasaryan <surenb@google.com>,
	linux-kernel@vger.kernel.org,  linux-kselftest@vger.kernel.org,
	linux-mm@kvack.org,  Sashiko <sashiko-bot@kernel.org>
Subject: [PATCH 0/4] userfaultfd: fixes for sashiko reports
Date: Wed, 02 Dec 2026 20:20:05 +0200	[thread overview]
Message-ID: <20261202-fixes-uffd-sashiko-v1-0-a6f5a874334a@kernel.org> (raw)

These are fixes for userfaultfd bugs reported by sashiko, plus a THP
variant of one of them found while looking at the reports.

The first patch closes a race between closing a userfaultfd and uffd
operations of another userfaultfd of the same mm that can leave a
writable PTE with the uffd marker bit set.

The next two make UFFDIO_MOVE mark moved zero pages and THPs soft-dirty,
like it does for other PTEs and for the huge zero page.

The last one makes uffd-unit-tests free the test context when its setup
fails.

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
Mike Rapoport (Microsoft) (4):
      userfaultfd: write-lock the VMA before clearing its uffd state
      userfaultfd: mark zero pages moved by UFFDIO_MOVE soft-dirty
      userfaultfd: mark THPs moved by UFFDIO_MOVE soft-dirty
      selftests/mm: free the test context when uffd_test_ctx_init() fails

 mm/huge_memory.c                         |  1 +
 mm/userfaultfd.c                         |  5 +++++
 tools/testing/selftests/mm/uffd-common.c | 11 ++++++++---
 3 files changed, 14 insertions(+), 3 deletions(-)
---
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
change-id: 20261202-fixes-uffd-sashiko-fb173c1557eb

--
Sincerely yours,
Mike.


             reply	other threads:[~2026-12-02 18:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 18:20 Mike Rapoport (Microsoft) [this message]
2026-12-02 18:20 ` [PATCH 1/4] userfaultfd: write-lock the VMA before clearing its uffd state Mike Rapoport (Microsoft)
2026-12-02 20:08   ` Suren Baghdasaryan
2026-12-02 18:20 ` [PATCH 2/4] userfaultfd: mark zero pages moved by UFFDIO_MOVE soft-dirty Mike Rapoport (Microsoft)
2026-12-02 18:20 ` [PATCH 3/4] userfaultfd: mark THPs " Mike Rapoport (Microsoft)
2026-12-02 18:20 ` [PATCH 4/4] selftests/mm: free the test context when uffd_test_ctx_init() fails Mike Rapoport (Microsoft)

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=20261202-fixes-uffd-sashiko-v1-0-a6f5a874334a@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=sashiko-bot@kernel.org \
    --cc=surenb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®