diff options
-rw-r--r-- | arch/x86/kernel/sys_x86_64.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/mmap.c | 6 | ||||
-rw-r--r-- | include/linux/mm_types.h | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c index dbded5aedb81..30277e27431a 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c | |||
@@ -101,7 +101,7 @@ static void find_start_end(unsigned long flags, unsigned long *begin, | |||
101 | *begin = new_begin; | 101 | *begin = new_begin; |
102 | } | 102 | } |
103 | } else { | 103 | } else { |
104 | *begin = TASK_UNMAPPED_BASE; | 104 | *begin = current->mm->mmap_legacy_base; |
105 | *end = TASK_SIZE; | 105 | *end = TASK_SIZE; |
106 | } | 106 | } |
107 | } | 107 | } |
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index 845df6835f9f..5c1ae28825cd 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c | |||
@@ -112,12 +112,14 @@ static unsigned long mmap_legacy_base(void) | |||
112 | */ | 112 | */ |
113 | void arch_pick_mmap_layout(struct mm_struct *mm) | 113 | void arch_pick_mmap_layout(struct mm_struct *mm) |
114 | { | 114 | { |
115 | mm->mmap_legacy_base = mmap_legacy_base(); | ||
116 | mm->mmap_base = mmap_base(); | ||
117 | |||
115 | if (mmap_is_legacy()) { | 118 | if (mmap_is_legacy()) { |
116 | mm->mmap_base = mmap_legacy_base(); | 119 | mm->mmap_base = mm->mmap_legacy_base; |
117 | mm->get_unmapped_area = arch_get_unmapped_area; | 120 | mm->get_unmapped_area = arch_get_unmapped_area; |
118 | mm->unmap_area = arch_unmap_area; | 121 | mm->unmap_area = arch_unmap_area; |
119 | } else { | 122 | } else { |
120 | mm->mmap_base = mmap_base(); | ||
121 | mm->get_unmapped_area = arch_get_unmapped_area_topdown; | 123 | mm->get_unmapped_area = arch_get_unmapped_area_topdown; |
122 | mm->unmap_area = arch_unmap_area_topdown; | 124 | mm->unmap_area = arch_unmap_area_topdown; |
123 | } | 125 | } |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index ace9a5f01c64..4a189ba6b128 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -333,6 +333,7 @@ struct mm_struct { | |||
333 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); | 333 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); |
334 | #endif | 334 | #endif |
335 | unsigned long mmap_base; /* base of mmap area */ | 335 | unsigned long mmap_base; /* base of mmap area */ |
336 | unsigned long mmap_legacy_base; /* base of mmap area in bottom-up allocations */ | ||
336 | unsigned long task_size; /* size of task vm space */ | 337 | unsigned long task_size; /* size of task vm space */ |
337 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ | 338 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ |
338 | unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ | 339 | unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ |