[PATCH] Add mm->task_size and fix powerpc vdso

This patch adds mm->task_size to keep track of the task size of a given mm
and uses that to fix the powerpc vdso so that it uses the mm task size to
decide what pages to fault in instead of the current thread flags (which
broke when ptracing).

(akpm: I expect that mm_struct.task_size will become the way in which we
finally sort out the confusion between 32-bit processes and 32-bit mm's.  It
may need tweaks, but at this stage this patch is powerpc-only.)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Benjamin Herrenschmidt
2006-02-28 16:59:19 -08:00
committed by Linus Torvalds
parent f61388822a
commit 0551fbd29e
3 changed files with 11 additions and 4 deletions

View File

@ -182,8 +182,8 @@ static struct page * vdso_vma_nopage(struct vm_area_struct * vma,
unsigned long offset = address - vma->vm_start;
struct page *pg;
#ifdef CONFIG_PPC64
void *vbase = test_thread_flag(TIF_32BIT) ?
vdso32_kbase : vdso64_kbase;
void *vbase = (vma->vm_mm->task_size > TASK_SIZE_USER32) ?
vdso64_kbase : vdso32_kbase;
#else
void *vbase = vdso32_kbase;
#endif