浏览代码

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>
Martin Schwidefsky 10 年之前
父节点
当前提交
e143fa93c2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/s390/include/asm/elf.h

+ 1 - 1
arch/s390/include/asm/elf.h

@@ -211,7 +211,7 @@ do {								\
 
 extern unsigned long mmap_rnd_mask;
 
-#define STACK_RND_MASK	(mmap_rnd_mask)
+#define STACK_RND_MASK	(test_thread_flag(TIF_31BIT) ? 0x7ff : mmap_rnd_mask)
 
 #define ARCH_DLINFO							    \
 do {									    \