History

mm, fs: move randomize_stack_top from fs to mm

Patch series "Provide generic top-down mmap layout functions", v6. 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 This patch (of 14): This preparatory commit moves this function so that further introduction of generic topdown mmap layout is contained only in mm/util.c.

Alexandre Ghiti committed 7 years ago

Commit 649775b1 parent f385cb83 files · +24 −20Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/mm.h+2−0
@@ -2328,6 +2328,8 @@ extern int install_special_mapping(struct mm_struct *mm, · 2327 unmodified lines
2328 unsigned long addr, unsigned long len,2328 unsigned long addr, unsigned long len,
2329 unsigned long flags, struct page **pages);2329 unsigned long flags, struct page **pages);
2330 2330
2331unsigned long randomize_stack_top(unsigned long stack_top);
2332
2331extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);2333extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
2332 2334
2333extern unsigned long mmap_region(struct file *file, unsigned long addr,2335extern unsigned long mmap_region(struct file *file, unsigned long addr,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t