uml: stop specially protecting kernel stacks

Map all of physical memory as executable to avoid having to change stack
protections during fork and exit.

unprotect_stack is now called only from MODE_TT code, so it is marked as such.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Jeff Dike
2007-10-16 01:26:46 -07:00
committed by Linus Torvalds
parent 8d82076080
commit 5c8aaceab8
4 changed files with 7 additions and 4 deletions

View File

@@ -82,9 +82,9 @@ unsigned long alloc_stack(int order, int atomic)
if (atomic)
flags = GFP_ATOMIC;
page = __get_free_pages(flags, order);
if(page == 0)
if (page == 0)
return 0;
stack_protections(page);
return page;
}
@@ -141,7 +141,6 @@ void release_thread(struct task_struct *task)
void exit_thread(void)
{
unprotect_stack((unsigned long) current_thread);
}
void *get_current(void)