Skip to content

Commit e143fa9

Browse files
author
Martin Schwidefsky
committed
s390/mm: limit STACK_RND_MASK for compat tasks
For compat tasks the mmap randomization does not use the maximum randomization value from mmap_rnd_mask but the fixed value of 0x7ff. This needs to be respected in the definition of STACK_RND_MASK as well. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 20e76ee commit e143fa9

File tree

1 file changed

+1
-1
lines changed
  • arch/s390/include/asm

1 file changed

+1
-1
lines changed

arch/s390/include/asm/elf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ do { \
211211

212212
extern unsigned long mmap_rnd_mask;
213213

214-
#define STACK_RND_MASK (mmap_rnd_mask)
214+
#define STACK_RND_MASK (test_thread_flag(TIF_31BIT) ? 0x7ff : mmap_rnd_mask)
215215

216216
#define ARCH_DLINFO \
217217
do { \

0 commit comments

Comments
 (0)