From: Ingo Molnar Date: Tue, 26 Feb 2008 11:55:57 +0000 (+0100) Subject: x86: fix execve with -fstack-protect X-Git-Tag: v2.6.25-rc4~159^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d119b2c9a490e2d647eae134211b32a18a04c7d;p=pandora-kernel.git x86: fix execve with -fstack-protect pointed out by pageexec@freemail.hu: > what happens here is that gcc treats the argument area as owned by the > callee, not the caller and is allowed to do certain tricks. for ssp it > will make a copy of the struct passed by value into the local variable > area and pass *its* address down, and it won't copy it back into the > original instance stored in the argument area. > > so once sys_execve returns, the pt_regs passed by value hasn't at all > changed and its default content will cause a nice double fault (FWIW, > this part took me the longest to debug, being down with cold didn't > help it either ;). To fix this we pass in pt_regs by pointer. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed