]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] correct vm_page_prot on stack pages
authorAndrew Morton <akpm@digeo.com>
Sat, 12 Apr 2003 19:56:06 +0000 (12:56 -0700)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Sat, 12 Apr 2003 19:56:06 +0000 (12:56 -0700)
From: David Mosberger <davidm@napali.hpl.hp.com>

The patch below is needed to make it possible to map stack pages
without execution permission (as we do on ia64).

fs/exec.c

index 455da3c362e5a78000ddfe93935144235ab7e0e8..e3d434aa3a8f7d5d595cd57239d0ab92f0a066c0 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -406,7 +406,7 @@ int setup_arg_pages(struct linux_binprm *bprm)
                mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
                mpnt->vm_end = STACK_TOP;
 #endif
-               mpnt->vm_page_prot = PAGE_COPY;
+               mpnt->vm_page_prot = protection_map[VM_STACK_FLAGS & 0x7];
                mpnt->vm_flags = VM_STACK_FLAGS;
                mpnt->vm_ops = NULL;
                mpnt->vm_pgoff = 0;