Revert "mm/shmem: unconditionally set pte dirty in mfill_atomic_install_pte"
authorSalvatore Bonaccorso <carnil@debian.org>
Tue, 9 Aug 2022 18:04:52 +0000 (20:04 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Wed, 10 Aug 2022 18:11:48 +0000 (19:11 +0100)
commit6bde509bc5c33e4dd2936016e683c3cd48f8c82c
tree94427a65f77c38efcb07e32efe1c79529f56481f
parentfaf03b789e63d97c3c1efbfb6945699a098ce5e9
Revert "mm/shmem: unconditionally set pte dirty in mfill_atomic_install_pte"

Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-2590

This reverts upstream commit 9ae0f87d009ca6c4aab2882641ddfc319727e3db.

David Hildenbrand reports:

    Note 2: Kernels before extended uffd-wp support and before
            PageAnonExclusive (< 5.19) can simply revert the problematic
            commit instead and be safe regarding UFFDIO_CONTINUE. A backport to
            v5.19 requires minor adjustments due to lack of
            vma_soft_dirty_enabled().

Link: https://lore.kernel.org/linux-mm/20220808073232.8808-1-david@redhat.com/
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name Revert-mm-shmem-unconditionally-set-pte-dirty-in-mfi.patch
mm/shmem.c
mm/userfaultfd.c