From 300c26525d4d64338c61d8f2fc776370afc534d6 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 12 Apr 2003 12:56:06 -0700 Subject: [PATCH] [PATCH] correct vm_page_prot on stack pages From: David Mosberger The patch below is needed to make it possible to map stack pages without execution permission (as we do on ia64). --- fs/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exec.c b/fs/exec.c index 455da3c362e5a..e3d434aa3a8f7 100644 --- 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; -- 2.53.0