@@ -162,18 +162,13 @@ enum {
162162 * ELF register definitions..
163163 */
164164
165- #include <linux/compat.h>
166-
167165#include <asm/ptrace.h>
168166#include <asm/syscall.h>
169167#include <asm/user.h>
170168
171169typedef s390_fp_regs elf_fpregset_t ;
172170typedef s390_regs elf_gregset_t ;
173171
174- typedef s390_fp_regs compat_elf_fpregset_t ;
175- typedef s390_compat_regs compat_elf_gregset_t ;
176-
177172#include <linux/sched/mm.h> /* for task_struct */
178173#include <asm/mmu_context.h>
179174
@@ -183,10 +178,6 @@ typedef s390_compat_regs compat_elf_gregset_t;
183178#define elf_check_arch (x ) \
184179 (((x)->e_machine == EM_S390 || (x)->e_machine == EM_S390_OLD) \
185180 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
186- #define compat_elf_check_arch (x ) \
187- (((x)->e_machine == EM_S390 || (x)->e_machine == EM_S390_OLD) \
188- && (x)->e_ident[EI_CLASS] == ELF_CLASS)
189- #define compat_start_thread start_thread31
190181
191182/* For SVR4/S390 the function pointer to be registered with `atexit` is
192183 passed in R14. */
@@ -203,9 +194,7 @@ typedef s390_compat_regs compat_elf_gregset_t;
203194 the loader. We need to make sure that it is out of the way of the program
204195 that it will "exec", and that there is sufficient room for the brk. 64-bit
205196 tasks are aligned to 4GB. */
206- #define ELF_ET_DYN_BASE (is_compat_task() ? \
207- (STACK_TOP / 3 * 2) : \
208- (STACK_TOP / 3 * 2) & ~((1UL << 32) - 1))
197+ #define ELF_ET_DYN_BASE ((STACK_TOP / 3 * 2) & ~((1UL << 32) - 1))
209198
210199/* This yields a mask that user programs can use to figure out what
211200 instruction set this CPU supports. */
@@ -224,43 +213,22 @@ extern unsigned long elf_hwcap;
224213extern char elf_platform [];
225214#define ELF_PLATFORM (elf_platform)
226215
227- #ifndef CONFIG_COMPAT
228216#define SET_PERSONALITY (ex ) \
229217do { \
230218 set_personality(PER_LINUX | \
231219 (current->personality & (~PER_MASK))); \
232220 current->thread.sys_call_table = sys_call_table; \
233221} while (0)
234- #else /* CONFIG_COMPAT */
235- #define SET_PERSONALITY (ex ) \
236- do { \
237- if (personality(current->personality) != PER_LINUX32) \
238- set_personality(PER_LINUX | \
239- (current->personality & ~PER_MASK)); \
240- if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \
241- set_thread_flag(TIF_31BIT); \
242- current->thread.sys_call_table = \
243- sys_call_table_emu; \
244- } else { \
245- clear_thread_flag(TIF_31BIT); \
246- current->thread.sys_call_table = \
247- sys_call_table; \
248- } \
249- } while (0)
250- #endif /* CONFIG_COMPAT */
251222
252223/*
253224 * Cache aliasing on the latest machines calls for a mapping granularity
254- * of 512KB for the anonymous mapping base. For 64-bit processes use a
255- * 512KB alignment and a randomization of up to 1GB. For 31-bit processes
256- * the virtual address space is limited, use no alignment and limit the
257- * randomization to 8MB.
258- * For the additional randomization of the program break use 32MB for
259- * 64-bit and 8MB for 31-bit.
225+ * of 512KB for the anonymous mapping base. Use a 512KB alignment and a
226+ * randomization of up to 1GB.
227+ * For the additional randomization of the program break use 32MB.
260228 */
261- #define BRK_RND_MASK (is_compat_task() ? 0x7ffUL : 0x1fffUL)
262- #define MMAP_RND_MASK (is_compat_task() ? 0x7ffUL : 0x3ff80UL)
263- #define MMAP_ALIGN_MASK (is_compat_task() ? 0 : 0x7fUL)
229+ #define BRK_RND_MASK (0x1fffUL)
230+ #define MMAP_RND_MASK (0x3ff80UL)
231+ #define MMAP_ALIGN_MASK (0x7fUL)
264232#define STACK_RND_MASK MMAP_RND_MASK
265233
266234/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
0 commit comments