]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'simplify-do_wp_page'
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2020 16:31:54 +0000 (09:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2020 16:31:54 +0000 (09:31 -0700)
commit8cab0034762397fc7e0e9ce9436688b09e30f53a
tree27b4216414a6ccb5cc65999a0c249d005f01d1cf
parent63f3aee6e5aa5a93ab2e999e381588883f360cc9
parent8e70c835fbc2c4293bd77989cc7e6b0b7f4e98c2
Merge branch 'simplify-do_wp_page'

Merge emailed patches from Peter Xu:
 "This is a small series that I picked up from Linus's suggestion to
  simplify cow handling (and also make it more strict) by checking
  against page refcounts rather than mapcounts.

  This makes uffd-wp work again (verified by running upmapsort)"

Note: this is horrendously bad timing, and making this kind of
fundamental vm change after -rc3 is not at all how things should work.
The saving grace is that it really is a a nice simplification:

 8 files changed, 29 insertions(+), 120 deletions(-)

The reason for the bad timing is that it turns out that commit
6f823bbc47dc ("gup: document and work around 'COW can break either way'
issue" broke not just UFFD functionality (as Peter noticed), but Mikulas
Patocka also reports that it caused issues for strace when running in a
DAX environment with ext4 on a persistent memory setup.

And we can't just revert that commit without re-introducing the original
issue that is a potential security hole, so making COW stricter (and in
the process much simpler) is a step to then undoing the forced COW that
broke other uses.

Link: https://lore.kernel.org/lkml/alpine.LRH.2.02.2009031328040.6929@file01.intranet.prod.int.rdu2.redhat.com/
* emailed patches from Peter Xu <peterx@redhat.com>:
  mm: Add PGREUSE counter
  mm/gup: Remove enfornced COW mechanism
  mm/ksm: Remove reuse_ksm_page()
  mm: do_wp_page() simplification
drivers/gpu/drm/i915/gem/i915_gem_userptr.c
include/linux/vm_event_item.h
mm/gup.c
mm/huge_memory.c
mm/ksm.c
mm/memory.c
mm/vmstat.c