* [patch] x86_64: enlarge window for stack growth
@ 2006-06-23 0:33 Chuck Ebbert
2006-06-23 12:29 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2006-06-23 0:33 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
Allow stack growth so the 'enter' instruction works. Also
fixes problem in compat_sys_kexec_load() which could allocate
more than 128 bytes using compat_alloc_user_space().
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
--- 2.6.17-rc6-64.orig/arch/x86_64/mm/fault.c
+++ 2.6.17-rc6-64/arch/x86_64/mm/fault.c
@@ -410,8 +410,10 @@ asmlinkage void __kprobes do_page_fault(
if (!(vma->vm_flags & VM_GROWSDOWN))
goto bad_area;
if (error_code & 4) {
- // XXX: align red zone size with ABI
- if (address + 128 < regs->rsp)
+ /* Allow userspace just enough access below the stack pointer
+ * to let the 'enter' instruction work.
+ */
+ if (address + 65536 + 32 * sizeof(unsigned long) < regs->rsp)
goto bad_area;
}
if (expand_stack(vma, address))
--
Chuck
"You can't read a newspaper if you can't read." --George W. Bush
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] x86_64: enlarge window for stack growth
2006-06-23 0:33 [patch] x86_64: enlarge window for stack growth Chuck Ebbert
@ 2006-06-23 12:29 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-06-23 12:29 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: linux-kernel
On Friday 23 June 2006 02:33, Chuck Ebbert wrote:
> Allow stack growth so the 'enter' instruction works. Also
> fixes problem in compat_sys_kexec_load() which could allocate
> more than 128 bytes using compat_alloc_user_space().
Merged thanks.
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-23 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23 0:33 [patch] x86_64: enlarge window for stack growth Chuck Ebbert
2006-06-23 12:29 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox