diff options
-rw-r--r-- | arch/powerpc/kernel/vdso.c | 4 | ||||
-rw-r--r-- | fs/exec.c | 6 | ||||
-rw-r--r-- | include/linux/sched.h | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index f0c47dab0903..04f7df39ffbb 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -182,8 +182,8 @@ static struct page * vdso_vma_nopage(struct vm_area_struct * vma, | |||
182 | unsigned long offset = address - vma->vm_start; | 182 | unsigned long offset = address - vma->vm_start; |
183 | struct page *pg; | 183 | struct page *pg; |
184 | #ifdef CONFIG_PPC64 | 184 | #ifdef CONFIG_PPC64 |
185 | void *vbase = test_thread_flag(TIF_32BIT) ? | 185 | void *vbase = (vma->vm_mm->task_size > TASK_SIZE_USER32) ? |
186 | vdso32_kbase : vdso64_kbase; | 186 | vdso64_kbase : vdso32_kbase; |
187 | #else | 187 | #else |
188 | void *vbase = vdso32_kbase; | 188 | void *vbase = vdso32_kbase; |
189 | #endif | 189 | #endif |
@@ -885,6 +885,12 @@ int flush_old_exec(struct linux_binprm * bprm) | |||
885 | current->flags &= ~PF_RANDOMIZE; | 885 | current->flags &= ~PF_RANDOMIZE; |
886 | flush_thread(); | 886 | flush_thread(); |
887 | 887 | ||
888 | /* Set the new mm task size. We have to do that late because it may | ||
889 | * depend on TIF_32BIT which is only updated in flush_thread() on | ||
890 | * some architectures like powerpc | ||
891 | */ | ||
892 | current->mm->task_size = TASK_SIZE; | ||
893 | |||
888 | if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || | 894 | if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || |
889 | file_permission(bprm->file, MAY_READ) || | 895 | file_permission(bprm->file, MAY_READ) || |
890 | (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) { | 896 | (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index b6f51e3a38ec..ff2e09c953b9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -298,8 +298,9 @@ struct mm_struct { | |||
298 | unsigned long addr, unsigned long len, | 298 | unsigned long addr, unsigned long len, |
299 | unsigned long pgoff, unsigned long flags); | 299 | unsigned long pgoff, unsigned long flags); |
300 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); | 300 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); |
301 | unsigned long mmap_base; /* base of mmap area */ | 301 | unsigned long mmap_base; /* base of mmap area */ |
302 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ | 302 | unsigned long task_size; /* size of task vm space */ |
303 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ | ||
303 | unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ | 304 | unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ |
304 | pgd_t * pgd; | 305 | pgd_t * pgd; |
305 | atomic_t mm_users; /* How many users with user space? */ | 306 | atomic_t mm_users; /* How many users with user space? */ |