/* * 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.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 | catalin marinas | 34 | 100.00% | 1 | 100.00% |
Total | 34 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
daniel cashman | daniel cashman | 38 | 63.33% | 2 | 50.00% |
catalin marinas | catalin marinas | 21 | 35.00% | 1 | 25.00% |
kees cook | kees cook | 1 | 1.67% | 1 | 25.00% |
Total | 60 | 100.00% | 4 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
catalin marinas | catalin marinas | 47 | 92.16% | 1 | 50.00% |
kees cook | kees cook | 4 | 7.84% | 1 | 50.00% |
Total | 51 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
catalin marinas | catalin marinas | 45 | 65.22% | 1 | 33.33% |
kees cook | kees cook | 24 | 34.78% | 2 | 66.67% |
Total | 69 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
catalin marinas | catalin marinas | 40 | 97.56% | 1 | 50.00% |
min-hua chen | min-hua chen | 1 | 2.44% | 1 | 50.00% |
Total | 41 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
catalin marinas | catalin marinas | 29 | 100.00% | 1 | 100.00% |
Total | 29 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
catalin marinas | catalin marinas | 35 | 100.00% | 1 | 100.00% |
Total | 35 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
catalin marinas | catalin marinas | 306 | 81.82% | 1 | 16.67% |
daniel cashman | daniel cashman | 38 | 10.16% | 2 | 33.33% |
kees cook | kees cook | 29 | 7.75% | 2 | 33.33% |
min-hua chen | min-hua chen | 1 | 0.27% | 1 | 16.67% |
Total | 374 | 100.00% | 6 | 100.00% |