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

Helge Deller <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.ports.arm.kernel,gmane.linux.ports.alpha,gmane.linux.kernel,gmane.linux.kernel.arc,gmane.linux.ports.parisc,gmane.linux.ports.ppc64.devel,gmane.linux.ports.sparc,gmane.linux.kernel.mm
Message-ID <[email protected]>
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 <[email protected]>
> ---
>   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 <[email protected]>  # parisc

Helge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.