diff options
author | Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> | 2012-02-26 20:17:55 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-02-27 00:59:04 +0400 |
commit | 42dfc43ee5999ac64284476ea0ac6c937587cf2b (patch) | |
tree | 4527353aa4f9cfedc09142f2a9da418c90b618e5 /include/linux/usb/ch9.h | |
parent | b01543dfe67bb1d191998e90d20534dc354de059 (diff) | |
download | linux-42dfc43ee5999ac64284476ea0ac6c937587cf2b.tar.xz |
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>
Diffstat (limited to 'include/linux/usb/ch9.h')
0 files changed, 0 insertions, 0 deletions