Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] userfaultfd: fixes for sashiko reports
@ 2026-12-02 18:20 Mike Rapoport (Microsoft)
  2026-12-02 18:20 ` [PATCH 1/4] userfaultfd: write-lock the VMA before clearing its uffd state Mike Rapoport (Microsoft)
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mike Rapoport (Microsoft) @ 2026-12-02 18:20 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand
  Cc: Mike Rapoport, Peter Xu, Suren Baghdasaryan, linux-kernel,
	linux-kselftest, linux-mm, Sashiko

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.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-12-02 19:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 18:20 [PATCH 0/4] userfaultfd: fixes for sashiko reports Mike Rapoport (Microsoft)
2026-12-02 18:20 ` [PATCH 1/4] userfaultfd: write-lock the VMA before clearing its uffd state Mike Rapoport (Microsoft)
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)
2026-12-02 19:18   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox