All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] userfaultfd: fixes for sashiko reports
@ 2026-12-03 17:15 Mike Rapoport (Microsoft)
  2026-12-03 17:15 ` [PATCH v2 1/4] userfaultfd: write-lock the VMA before clearing its uffd state Mike Rapoport (Microsoft)
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Mike Rapoport (Microsoft) @ 2026-12-03 17:15 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>
---
Changes in v2:
- address sashiko findings in selftest
- Link to v1: https://patch.msgid.link/20261202-fixes-uffd-sashiko-v1-0-a6f5a874334a@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 | 27 +++++++++++++++++++++++----
 3 files changed, 29 insertions(+), 4 deletions(-)
---
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
change-id: 20261202-fixes-uffd-sashiko-fb173c1557eb

--
Sincerely yours,
Mike.


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

end of thread, other threads:[~2026-12-05 17:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 17:15 [PATCH v2 0/4] userfaultfd: fixes for sashiko reports Mike Rapoport (Microsoft)
2026-12-03 17:15 ` [PATCH v2 1/4] userfaultfd: write-lock the VMA before clearing its uffd state Mike Rapoport (Microsoft)
2026-12-04  7:04   ` + userfaultfd-write-lock-the-vma-before-clearing-its-uffd-state.patch added to mm-new branch Andrew Morton
2026-12-04  9:27   ` [PATCH v2 1/4] userfaultfd: write-lock the VMA before clearing its uffd state Jose A. Perez de Azpillaga
2026-12-03 17:15 ` [PATCH v2 2/4] userfaultfd: mark zero pages moved by UFFDIO_MOVE soft-dirty Mike Rapoport (Microsoft)
2026-12-04  7:04   ` + userfaultfd-mark-zero-pages-moved-by-uffdio_move-soft-dirty.patch added to mm-new branch Andrew Morton
2026-12-04  9:31   ` [PATCH v2 2/4] userfaultfd: mark zero pages moved by UFFDIO_MOVE soft-dirty Jose A. Perez de Azpillaga
2026-12-03 17:15 ` [PATCH v2 3/4] userfaultfd: mark THPs " Mike Rapoport (Microsoft)
2026-12-04  7:04   ` + userfaultfd-mark-thps-moved-by-uffdio_move-soft-dirty.patch added to mm-new branch Andrew Morton
2026-12-04  9:32   ` [PATCH v2 3/4] userfaultfd: mark THPs moved by UFFDIO_MOVE soft-dirty Jose A. Perez de Azpillaga
2026-12-03 17:15 ` [PATCH v2 4/4] selftests/mm: free the test context when uffd_test_ctx_init() fails Mike Rapoport (Microsoft)
2026-12-04  7:04   ` + selftests-mm-free-the-test-context-when-uffd_test_ctx_init-fails.patch added to mm-new branch Andrew Morton
2026-12-04  9:39   ` [PATCH v2 4/4] selftests/mm: free the test context when uffd_test_ctx_init() fails Jose A. Perez de Azpillaga
2026-12-05 17:09   ` Andrew Morton
2026-12-05 17:09   ` + selftests-mm-free-the-test-context-when-uffd_test_ctx_init-fails-fix.patch added to mm-new branch Andrew Morton

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.