Files
kernel_arpi/mm
Suren Baghdasaryan 50d2b75b86 ANDROID: mm: preserve vma->anon_vma after MREMAP_DONTUNMAP for SPF
The optimizations [1] and [2] to reset vma->anon_vma during
MREMAP_DONTUNMAP can affect speculative page fault handler. If
vma->anon_vma reset happens after do_anonymous_page verified no
changes to the vma and obtained the ptl lock but before it calls
page_add_new_anon_rmap() then __page_set_anon_rmap() will stumble
on BUG_ON(!anon_vma). Disable these optimizations if SPF is enabled
to avoid such situations. As a result the reverse map walk will
consider the old VMA as it did before these optimizations were
introduced.

[1] 1583aa278f ("mm: mremap: unlink anon_vmas when mremap with MREMAP_DONTUNMAP success")
[2] ee8ab1903e ("mm: rmap: explicitly reset vma->anon_vma in unlink_anon_vmas()")

Bug: 257443051
Change-Id: I4e7611137f4a49c94bfe73532b4b06cbb0d2405b
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2022-11-23 10:27:02 -08:00
..
2022-11-16 10:04:35 +00:00
2022-06-09 10:28:01 +02:00
2022-07-13 11:40:42 +02:00
2022-07-13 11:40:42 +02:00
2022-03-23 11:32:12 -07:00
2022-10-12 20:14:04 +02:00
2022-09-24 14:12:45 +02:00
2021-09-13 10:18:28 -07:00
2022-10-05 11:59:55 +02:00
2022-03-16 12:53:52 +01:00
2022-09-21 17:30:12 +02:00
2022-10-05 11:59:55 +02:00
2022-06-09 15:39:10 +02:00
2022-06-06 11:12:02 +02:00
2021-11-23 11:59:24 +05:30
2022-04-27 16:02:52 +00:00
2022-06-09 15:39:10 +02:00
2022-06-06 11:12:02 +02:00
2022-06-06 11:12:02 +02:00
2022-09-28 13:32:32 +02:00
2021-11-23 11:59:24 +05:30
2022-07-13 19:41:43 +02:00
2022-06-06 11:12:02 +02:00
2022-07-09 11:22:04 +02:00