lkml.org 
[lkml]   [2019]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/4] Provide generic top-down mmap layout functions
Date
This series introduces generic functions to make top-down mmap layout
easily accessible to architectures, in particular riscv which was
the initial goal of this series.
The generic implementation was taken from arm64 and used successively
by arm, mips and finally riscv.

Note that in addition the series fixes 2 issues:
- stack randomization was taken into account even if not necessary.
- [1] fixed an issue with mmap base which did not take into account
randomization but did not report it to arm and mips, so by moving
arm64 into a generic library, this problem is now fixed for both
architectures.

This work is an effort to factorize architecture functions to avoid
code duplication and oversights as in [1].

[1]: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1429066.html

Alexandre Ghiti (4):
arm64, mm: Move generic mmap layout functions to mm
arm: Use generic mmap top-down layout
mips: Use generic mmap top-down layout
riscv: Make mmap allocation top-down by default

arch/arm/include/asm/processor.h | 2 +-
arch/arm/mm/mmap.c | 52 ----------------
arch/arm64/include/asm/processor.h | 2 +-
arch/arm64/mm/mmap.c | 72 ----------------------
arch/mips/include/asm/processor.h | 4 +-
arch/mips/mm/mmap.c | 57 -----------------
arch/riscv/Kconfig | 12 ++++
arch/riscv/include/asm/processor.h | 1 +
fs/binfmt_elf.c | 20 ------
include/linux/mm.h | 2 +
kernel/sysctl.c | 6 +-
mm/util.c | 99 +++++++++++++++++++++++++++++-
12 files changed, 121 insertions(+), 208 deletions(-)

--
2.20.1

\
 
 \ /
  Last update: 2019-03-22 08:42    [W:0.067 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site