/* * Based on arch/arm/mm/mmap.c * * Copyright (C) 2012 ARM Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <linux/elf.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/mman.h> #include <linux/export.h> #include <linux/shm.h> #include <linux/sched/signal.h> #include <linux/sched/mm.h> #include <linux/io.h> #include <linux/personality.h> #include <linux/random.h> #include <asm/cputype.h> /* * Leave enough space between the mmap area and the stack to honour ulimit in * the face of randomisation. */ #define MIN_GAP (SZ_128M + ((STACK_RND_MASK << PAGE_SHIFT) + 1)) #define MAX_GAP (STACK_TOP/6*5)
static int mmap_is_legacy(void) { if (current->personality & ADDR_COMPAT_LAYOUT) return 1; if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) return 1; return sysctl_legacy_va_layout; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Catalin Marinas | 34 | 100.00% | 1 | 100.00% |
Total | 34 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Daniel Cashman | 38 | 63.33% | 2 | 50.00% |
Catalin Marinas | 21 | 35.00% | 1 | 25.00% |
Kees Cook | 1 | 1.67% | 1 | 25.00% |
Total | 60 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Catalin Marinas | 47 | 92.16% | 1 | 50.00% |
Kees Cook | 4 | 7.84% | 1 | 50.00% |
Total | 51 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Catalin Marinas | 45 | 65.22% | 1 | 33.33% |
Kees Cook | 24 | 34.78% | 2 | 66.67% |
Total | 69 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Catalin Marinas | 40 | 97.56% | 1 | 50.00% |
Min-Hua Chen | 1 | 2.44% | 1 | 50.00% |
Total | 41 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Catalin Marinas | 29 | 100.00% | 1 | 100.00% |
Total | 29 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Catalin Marinas | 35 | 100.00% | 1 | 100.00% |
Total | 35 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Catalin Marinas | 305 | 80.90% | 1 | 12.50% |
Daniel Cashman | 38 | 10.08% | 2 | 25.00% |
Kees Cook | 29 | 7.69% | 2 | 25.00% |
Ingo Molnar | 4 | 1.06% | 2 | 25.00% |
Min-Hua Chen | 1 | 0.27% | 1 | 12.50% |
Total | 377 | 100.00% | 8 | 100.00% |