aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-02-28 19:59:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-28 23:53:44 -0500
commit0551fbd29e16fccd46e41b7d01bf0f8f39b14212 (patch)
tree760783df743eec940d6f6cb848498580ddde03d8 /fs
parentf61388822a6040ff462c5f7260daa0f1017f2db0 (diff)
[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>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 0e1c95074d42..0b515ac53134 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -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)) {