|
@@ -115,7 +115,7 @@ static unsigned long get_mmap_base(int is_legacy)
|
|
static void find_start_end(unsigned long flags, unsigned long *begin,
|
|
static void find_start_end(unsigned long flags, unsigned long *begin,
|
|
unsigned long *end)
|
|
unsigned long *end)
|
|
{
|
|
{
|
|
- if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT)) {
|
|
|
|
|
|
+ if (!in_compat_syscall() && (flags & MAP_32BIT)) {
|
|
/* This is usually used needed to map code in small
|
|
/* This is usually used needed to map code in small
|
|
model, so it needs to be in the first 31bit. Limit
|
|
model, so it needs to be in the first 31bit. Limit
|
|
it to that. This means we need to move the
|
|
it to that. This means we need to move the
|
|
@@ -191,7 +191,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
|
|
return addr;
|
|
return addr;
|
|
|
|
|
|
/* for MAP_32BIT mappings we force the legacy mmap base */
|
|
/* for MAP_32BIT mappings we force the legacy mmap base */
|
|
- if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT))
|
|
|
|
|
|
+ if (!in_compat_syscall() && (flags & MAP_32BIT))
|
|
goto bottomup;
|
|
goto bottomup;
|
|
|
|
|
|
/* requesting a specific address */
|
|
/* requesting a specific address */
|