Skip to content

mm: update mips to use do_mmap(), make mmap_region() internal

Lorenzo Stoakes linux-mips linux-mm lkml 1 version Applied

Status from this message: [merged mm-stable] mm-make-mmap_region-internal.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Changes in v1 from the cover letter

* Stripped RFC, as Thomas indicated that the approach seemed correct from MIPS side.
* Avoided whitespace error as pointed out by Matthew.
* Rebased on tip mm-unstable, as previously a conflict emerged after I submitted the patch (quite possibly one I caused :P).

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mips: vdso: prefer do_mmap() to mmap_region()arch/mips/kernel/vdso.c+6 -41 replyApplied
2/2mm: make mmap_region() internalinclude/linux/mm.h mm/mmap.c mm/vma.c +2 more+126 -641 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLiam R. Howlett
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] mm: update mips to use do_mmap(), make mmap_region() internal

Currently the only user of mmap_region() outside of the memory management code is the MIPS VDSO implementation.

This uses mmap_region() to map a 'delay slot emulation page' at the top of the stack which is read-only and executable.

This mapping requires that an already-acquired mmap write lock is utilised and that uffd and populate logic is ignored. This rules out vm_mmap(), however do_mmap() fits the bill.

Adapt this code to use do_mmap() and then once done, make mmap_region() internal and userland testable, and avoid any other uses of mmap_region(), which is absolutely and strictly an internal mm function which bypasses a great number of checks and logic.

v1:
* Stripped RFC, as Thomas indicated that the approach seemed correct from MIPS side.
* Avoided whitespace error as pointed out by Matthew.
* Rebased on tip mm-unstable, as previously a conflict emerged after I submitted the patch (quite possibly one I caused :P).

RFC:
https://lore.kernel.org/all/[email protected]/

Lorenzo Stoakes (2):
mips: vdso: prefer do_mmap() to mmap_region()
mm: make mmap_region() internal

 arch/mips/kernel/vdso.c          | 10 +++--
 include/linux/mm.h               |  3 --
 mm/mmap.c                        | 59 -----------------------------
 mm/vma.c                         | 61 +++++++++++++++++++++++++++++-
 mm/vma.h                         |  2 +-
 tools/testing/vma/vma_internal.h | 65 ++++++++++++++++++++++++++++++++
 6 files changed, 132 insertions(+), 68 deletions(-)

--
2.47.1