aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <[email protected]>2012-02-26 16:17:55 +0000
committerH. Peter Anvin <[email protected]>2012-02-26 20:59:04 +0000
commit42dfc43ee5999ac64284476ea0ac6c937587cf2b (patch)
tree4527353aa4f9cfedc09142f2a9da418c90b618e5 /lib/string_helpers.c
parentLinux 3.3-rc4 (diff)
downloadkernel-42dfc43ee5999ac64284476ea0ac6c937587cf2b.tar.gz
kernel-42dfc43ee5999ac64284476ea0ac6c937587cf2b.zip
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 <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions