Fix incorrect access of hugetlb pte entries
Status from this message: [merged mm-stable] mm-mprotect-use-huge_ptep_get-for-hugetlb.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest6 patches 20 repliesApplied 6/6
- v26 patches 17 repliesSuperseded
- v15 patches 33 repliesSuperseded
Changes in v3 from the cover letter
- Place comment at appropriate place in patches 2 and 3
- Modify indentation in patch 2, patch 6
Patches in v3 All 6 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | arm64: make huge_ptep_get handled unaligned addressesarch/ | +1 | 8 replies | Applied |
| 2/6 | mm/rmap: use huge_ptep_get() in try_to_unmap_one()include/ mm/ | +12 | 2 replies | Applied |
| 3/6 | mm/rmap: use huge_ptep_get() in try_to_migrate_one()mm/ | +10 | 1 reply | Applied |
| 4/6 | mm/migrate: use huge_ptep_get() in remove_migration_pte()mm/ | +5 | 0 replies | Applied |
| 5/6 | mm/page_vma_mapped: use huge_ptep_get() for hugetlbmm/ | +7 | 0 replies | Applied |
| 6/6 | mm/mprotect: use huge_ptep_get() for hugetlbmm/ | +9 | 3 replies | Applied |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | David Hildenbrand (Arm) | Muchun Song |
|---|---|---|
| 1/6 | A-b | A-b |
| 2/6 | A-b | R-b |
| 3/6 | A-b | A-b |
| 4/6 | A-b | A-b |
| 5/6 | A-b | R-b |
| 6/6 | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/6] Fix incorrect access of hugetlb pte entries
There are various places which use ptep_get() to get the pte entry corresponding to a hugetlb folio. Some arches (like s390) have special handling to compute the pteval, so they provide huge_ptep_get(). Use this helper consistently.
Additionally, some code paths may provide huge_ptep_get with an unaligned address. This is a problem on arm64 (I checked other arches and it looks fine for them), which is fixed in patch 1. The fix is made to be
backport-friendly: the cleaner fix would be to perhaps pass the hstate to huge_ptep_get() - that is wider churn and we can do that later.
---v2->v3:
- Place comment at appropriate place in patches 2 and 3
- Modify indentation in patch 2, patch 6
v1->v2:
- Add patch 1
- Mention s390 in cover letter
Dev Jain (6):
arm64: make huge_ptep_get handled unaligned addresses mm/rmap: use huge_ptep_get() in try_to_unmap_one() mm/rmap: use huge_ptep_get() in try_to_migrate_one() mm/migrate: use huge_ptep_get() in remove_migration_pte() mm/page_vma_mapped: use huge_ptep_get() for hugetlb mm/mprotect: use huge_ptep_get() for hugetlb
arch/arm64/mm/hugetlbpage.c | 2 +- include/linux/hugetlb.h | 2 ++ mm/migrate.c | 6 +++++- mm/mprotect.c | 12 +++++++++--- mm/page_vma_mapped.c | 8 +++++++- mm/rmap.c | 32 ++++++++++++++++++++------------ 6 files changed, 44 insertions(+), 18 deletions(-)
Signature · 1 line
2.43.0