forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/x86/mm/mmap.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Flexible mmap layout support
34 *
....@@ -8,20 +9,6 @@
89 * All Rights Reserved.
910 * Copyright 2005 Andi Kleen, SUSE Labs.
1011 * 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
2512 */
2613
2714 #include <linux/personality.h>
....@@ -31,7 +18,9 @@
3118 #include <linux/sched/signal.h>
3219 #include <linux/sched/mm.h>
3320 #include <linux/compat.h>
21
+#include <linux/elf-randomize.h>
3422 #include <asm/elf.h>
23
+#include <asm/io.h>
3524
3625 #include "physaddr.h"
3726
....@@ -166,7 +155,7 @@
166155 struct mm_struct *mm = current->mm;
167156
168157 #ifdef CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES
169
- if (in_compat_syscall()) {
158
+ if (in_32bit_syscall()) {
170159 return is_legacy ? mm->mmap_compat_legacy_base
171160 : mm->mmap_compat_base;
172161 }
....@@ -176,8 +165,6 @@
176165
177166 const char *arch_vma_name(struct vm_area_struct *vma)
178167 {
179
- if (vma->vm_flags & VM_MPX)
180
- return "[mpx]";
181168 return NULL;
182169 }
183170