Skip to content

mm/ksm: fix userfaultfd protection on 6.1

Lance Yang stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Rebase onto the stable queue and move the uffd-wp check below the soft-dirty block (per Sasha).
- https://lore.kernel.org/r/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm/ksm: simplify break_ksm() to not rely on VM_FAULT_WRITEmm/ksm.c+13 -120 replies
2/3mm/ksm: fix KSM COW breaking with userfaultfd-wp via FAULT_FLAG_UNSHAREmm/ksm.c+5 -70 replies
3/3mm/ksm: fix userfaultfd protection during merge and unmergemm/ksm.c+4 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPeter XuLorenzo Stoakes (ARM)Kiryl Shutsemau (Meta)David Hildenbrand (Arm)
1/3A-b
2/3A-b
3/3A-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH 6.1.y v2 0/3] mm/ksm: fix userfaultfd protection on 6.1

Hi Sasha,

Could we take David's two KSM patches first for 6.1.y? Both cherry-pick cleanly. 6.1 already has FAULT_FLAG_UNSHARE, but KSM still breaks COW with a fake write fault.

Patch 2 needs patch 1, and patch 3 needs both.

Thanks,
Lance

v1 -> v2:
- Rebase onto the stable queue and move the uffd-wp check below the soft-dirty block (per Sasha).
- https://lore.kernel.org/r/[email protected]/

Cc Andrea Arcangeli <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc John Hubbard <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Xu Xin <[email protected]>
Cc Chengming Zhou <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Jérôme Glisse <[email protected]>
Cc Peter Xu <[email protected]>
Cc Bobby Powers <[email protected]>
Cc Brian Geffon <[email protected]>
Cc Denis Plotnikov <[email protected]>
Cc Doug Gilbert <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Martin Cracauer <[email protected]>
Cc Marty McFadden <[email protected]>
Cc Maya Gokhale <[email protected]>
Cc Pavel Emelyanov <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Shaohua Li <[email protected]>
Cc James Houghton <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc SJ Park <[email protected]>
Cc Zi Yan <[email protected]>
Cc Mohammed EL Kadiri <[email protected]>
Cc David Hildenbrand <[email protected]>

David Hildenbrand (2):
mm/ksm: simplify break_ksm() to not rely on VM_FAULT_WRITE mm/ksm: fix KSM COW breaking with userfaultfd-wp via
FAULT_FLAG_UNSHARE

Lance Yang (1):
mm/ksm: fix userfaultfd protection during merge and unmerge

 mm/ksm.c | 39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)
Signature · 1 line
2.49.0