]> www.infradead.org Git - users/dwmw2/linux.git/commit
mm: make mmap_region() internal
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Thu, 2 Jan 2025 12:10:52 +0000 (12:10 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:38 +0000 (20:22 -0800)
commitf8d4a6cabb74f82c37ccb7c5e9dc3fdad50393d4
tree600af01adfa3d5055cb458112a508923bafb4120
parentc4f1b56f3f78d22d8f73bd9264a7c2e6d74432ff
mm: make mmap_region() internal

Now that we have removed the one user of mmap_region() outside of mm, make
it internal and add it to vma.c so it can be userland tested.

This ensures that all external memory mappings are performed using the
appropriate interfaces and allows us to modify memory mapping logic as we
see fit.

Additionally expand test stubs to allow for the mmap_region() code to
compile and be userland testable.

Link: https://lkml.kernel.org/r/de5a3c574d35c26237edf20a1d8652d7305709c9.1735819274.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Jann Horn <jannh@google.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/mmap.c
mm/vma.c
mm/vma.h
tools/testing/vma/vma_internal.h