4.14 backports of fixes for "CoW after fork() issue"
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 20 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | mm: reuse only-pte-mapped KSM page in do_wp_page()include/ mm/ mm/ | +49 | 2 replies | |
| 2/5 | mm: do_wp_page() simplificationmm/ | +17 | 0 replies | |
| 3/5 | mm: fix misplaced unlock_page in do_wp_page()mm/ | +1 | 0 replies | |
| 4/5 | userfaultfd: wp: add helper for writeprotect checkinclude/ | +10 | 0 replies | |
| 5/5 | mm/userfaultfd: fix memory corruption due to writeprotectmm/ | +8 | 0 replies |
Reviews trailers per patch
3 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Yang Shi | Gerald Schaefer | Jerome Glisse | Mike Rapoport | Peter Xu |
|---|---|---|---|---|---|
| 1/5 | R-b | ||||
| 2/5 | |||||
| 3/5 | Bisected-and-analyzed-by T-b | ||||
| 4/5 | R-b | R-b | |||
| 5/5 | R-b T-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 5 reviewers.
Cover letter [PATCH 0/5] 4.14 backports of fixes for "CoW after fork() issue"
We received a report that the copy-on-write issue repored by Jann Horn in
https://bugs.chromium.org/p/project-zero/issues/detail?id=2045 is still reproducible on 4.14 and 4.19 kernels (the first issue with the reproducer coded in vmsplice.c). I confirmed this and also that the issue was not reproducible with 5.10 kernel. I tracked the fix to the following patch introduced in 5.9 which changes the do_wp_page() logic:
09854ba94c6a 'mm: do_wp_page() simplification'
I backported this patch (#2 in the series) along with 2 prerequisite patches (#1 and #4) that keep the backports clean and two followup fixes to the main patch (#3 and #5). I had to skip the following fix:
feb889fb40fa 'mm: don't put pinned pages into the swap cache'
because it uses page_maybe_dma_pinned() which does not exists in earlier kernels. Because pin_user_pages() does not exist there as well, I *think* we can safely skip this fix on older kernels, but I would appreciate if someone could confirm that claim.
The patchset cleanly applies over: stable linux-4.14.y, tag: v4.14.228
Note: 4.14 and 4.19 backports are very similar, so while I backported only to these two versions I think backports for other versions can be done easily.
Kirill Tkhai (1):
mm: reuse only-pte-mapped KSM page in do_wp_page()
Linus Torvalds (2):
mm: do_wp_page() simplification
mm: fix misplaced unlock_page in do_wp_page()
Nadav Amit (1):
mm/userfaultfd: fix memory corruption due to writeprotect
Shaohua Li (1):
userfaultfd: wp: add helper for writeprotect check
include/linux/ksm.h | 7 ++++ include/linux/userfaultfd_k.h | 10 ++++++ mm/ksm.c | 30 ++++++++++++++++-- mm/memory.c | 60 ++++++++++++++++------------------- 4 files changed, 73 insertions(+), 34 deletions(-)
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog