Skip to content

Commit abd36ae

Browse files
committed
x86_64: bound mmap between legacy/modern bases
1 parent d6943a3 commit abd36ae

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/x86/kernel/sys_x86_64.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ static void find_start_end(unsigned long addr, unsigned long flags,
115115
}
116116

117117
*begin = get_mmap_base(1);
118-
if (in_compat_syscall())
119-
*end = task_size_32bit();
120-
else
121-
*end = task_size_64bit(addr > DEFAULT_MAP_WINDOW);
118+
*end = get_mmap_base(0);
122119
}
123120

124121
unsigned long
@@ -199,7 +196,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
199196

200197
info.flags = VM_UNMAPPED_AREA_TOPDOWN;
201198
info.length = len;
202-
info.low_limit = PAGE_SIZE;
199+
info.low_limit = get_mmap_base(1);
203200
info.high_limit = get_mmap_base(0);
204201

205202
/*

0 commit comments

Comments
 (0)