Thread (18 messages) 18 messages, 6 authors, 2024-09-04

Re: [PATCH 1/3] mm: Make arch_get_unmapped_area() take vm_flags by default

From: Helge Deller <deller@gmx.de>
Date: 2024-09-03 19:52:32
Also in: linux-alpha, linux-mm, linux-s390, linux-sh, lkml, loongarch, sparclinux

On 9/2/24 21:08, Mark Brown wrote:
When we introduced arch_get_unmapped_area_vmflags() in 961148704acd
("mm: introduce arch_get_unmapped_area_vmflags()") we did so as part of
properly supporting guard pages for shadow stacks on x86_64, which uses
a custom arch_get_unmapped_area(). Equivalent features are also present
on both arm64 and RISC-V, both of which use the generic implementation
of arch_get_unmapped_area() and will require equivalent modification
there. Rather than continue to deal with having two versions of the
functions let's bite the bullet and have all implementations of
arch_get_unmapped_area() take vm_flags as a parameter.

The new parameter is currently ignored by all implementations other than
x86. The only caller that doesn't have a vm_flags available is
mm_get_unmapped_area(), as for the x86 implementation and the wrapper used
on other architectures this is modified to supply no flags.

No functional changes.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
  arch/alpha/kernel/osf_sys.c       |  2 +-
  arch/arc/mm/mmap.c                |  3 ++-
  arch/arm/mm/mmap.c                |  7 ++++---
  arch/csky/abiv1/mmap.c            |  3 ++-
  arch/loongarch/mm/mmap.c          |  5 +++--
  arch/mips/mm/mmap.c               |  2 +-
  arch/parisc/kernel/sys_parisc.c   |  5 +++--
  arch/parisc/mm/hugetlbpage.c      |  2 +-
Acked-by: Helge Deller <deller@gmx.de>  # parisc

Helge
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help