mm: perform guard region install/remove under VMA lock
Status from this message: [merged mm-stable] mm-madvise-allow-guard-page-install-remove-under-vma-lock.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 8 repliesApplied 2/2
- v12 patches 4 repliesSuperseded
Changes in v2 from the cover letter
* Rename check_ops_valid() to check_ops_safe() as per David.
* Renamed is_vma_lock_valid() to is_vma_lock_sufficient() as per David.
Patches in v2 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm: rename walk_page_range_mm()mm/ mm/ mm/ | +14 | 3 replies | Applied |
| 2/2 | mm/madvise: allow guard page install/remove under VMA lockmm/ mm/ mm/ | +94 | 5 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | David Hildenbrand (Red Hat) | Vlastimil Babka | Davidlohr Bueso |
|---|---|---|---|
| 1/2 | A-b | R-b | R-b |
| 2/2 | A-b | R-b | R-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 3 reviewers.
Cover letter [PATCH v2 0/2] mm: perform guard region install/remove under VMA lock
There is no reason why can't perform guard region operations under the VMA lock, as long we take proper precautions to ensure that we do so in a safe manner.
This is fine, as VMA lock acquisition is always best-effort, so if we are unable to do so, we can simply fall back to using the mmap read lock.
Doing so will reduce mmap lock contention for callers performing guard region operations and help establish a precedent of trying to use the VMA lock where possible.
As part of this change we perform a trivial rename of page walk functions which bypass safety checks (i.e. whether or not mm_walk_ops->install_pte is specified) in order that we can keep naming consistent with the mm walk.
This is because we need to expose a VMA-specific walk that still allows us to install PTE entries.
v2:
* Rename check_ops_valid() to check_ops_safe() as per David.
* Renamed is_vma_lock_valid() to is_vma_lock_sufficient() as per David.
v1:
https://lore.kernel.org/all/[email protected]/
Lorenzo Stoakes (2):
mm: rename walk_page_range_mm()
mm/madvise: allow guard page install/remove under VMA lock
mm/internal.h | 5 ++- mm/madvise.c | 110 ++++++++++++++++++++++++++++++++++++-------------- mm/pagewalk.c | 37 ++++++++++------- 3 files changed, 105 insertions(+), 47 deletions(-)
--
2.51.0