Siddhesh Poyarekar 42dfc43ee5 x86_64: Record stack pointer before task execution begins
task->thread.usersp is unusable immediately after a binary is exec()'d
until it undergoes a context switch cycle. The start_thread() function
called during execve() saves the stack pointer into pt_regs and into
old_rsp, but fails to record it into task->thread.usersp.

Because of this, KSTK_ESP(task) returns an incorrect value for a
64-bit program until the task is switched out and back in since
switch_to swaps %rsp values in and out into task->thread.usersp.

Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Link: http://lkml.kernel.org/r/1330273075-2949-1-git-send-email-siddhesh.poyarekar@gmail.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-02-26 12:59:04 -08:00
..
2011-09-27 18:08:04 +02:00
2011-12-12 14:26:10 -08:00
2011-12-08 10:22:07 -08:00
2011-12-08 10:22:07 -08:00
2011-07-01 10:37:14 +02:00
2011-07-26 16:49:47 -07:00
2011-12-21 16:26:03 -08:00
2011-03-18 10:39:30 +01:00
2011-12-06 10:02:38 +01:00
2012-01-07 12:19:37 +01:00
2011-08-04 16:13:49 -07:00
2011-03-18 10:39:30 +01:00
2011-12-05 12:17:29 +01:00