| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Flexible mmap layout support |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * All Rights Reserved. |
|---|
| 9 | 10 | * Copyright 2005 Andi Kleen, SUSE Labs. |
|---|
| 10 | 11 | * Copyright 2007 Jiri Kosina, SUSE Labs. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 13 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 14 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 15 | | - * (at your option) any later version. |
|---|
| 16 | | - * |
|---|
| 17 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 20 | | - * GNU General Public License for more details. |
|---|
| 21 | | - * |
|---|
| 22 | | - * You should have received a copy of the GNU General Public License |
|---|
| 23 | | - * along with this program; if not, write to the Free Software |
|---|
| 24 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 25 | 12 | */ |
|---|
| 26 | 13 | |
|---|
| 27 | 14 | #include <linux/personality.h> |
|---|
| .. | .. |
|---|
| 31 | 18 | #include <linux/sched/signal.h> |
|---|
| 32 | 19 | #include <linux/sched/mm.h> |
|---|
| 33 | 20 | #include <linux/compat.h> |
|---|
| 21 | +#include <linux/elf-randomize.h> |
|---|
| 34 | 22 | #include <asm/elf.h> |
|---|
| 23 | +#include <asm/io.h> |
|---|
| 35 | 24 | |
|---|
| 36 | 25 | #include "physaddr.h" |
|---|
| 37 | 26 | |
|---|
| .. | .. |
|---|
| 166 | 155 | struct mm_struct *mm = current->mm; |
|---|
| 167 | 156 | |
|---|
| 168 | 157 | #ifdef CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES |
|---|
| 169 | | - if (in_compat_syscall()) { |
|---|
| 158 | + if (in_32bit_syscall()) { |
|---|
| 170 | 159 | return is_legacy ? mm->mmap_compat_legacy_base |
|---|
| 171 | 160 | : mm->mmap_compat_base; |
|---|
| 172 | 161 | } |
|---|
| .. | .. |
|---|
| 176 | 165 | |
|---|
| 177 | 166 | const char *arch_vma_name(struct vm_area_struct *vma) |
|---|
| 178 | 167 | { |
|---|
| 179 | | - if (vma->vm_flags & VM_MPX) |
|---|
| 180 | | - return "[mpx]"; |
|---|
| 181 | 168 | return NULL; |
|---|
| 182 | 169 | } |
|---|
| 183 | 170 | |
|---|