diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-12-01 11:38:06 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-12-01 11:38:06 +1100 |
commit | 3e96f3209a3ac6fae7152a668538247005c868a9 (patch) | |
tree | 35a9e88860ca9ffebc1ec621fc3af7b7c694d736 /arch/x86/include/asm/system.h | |
parent | 465915ed7f163b6b60ddc1c51c9aa1dc9de853b6 (diff) | |
parent | 26136bb101dc26e30ebc93ca865cc16013415f67 (diff) |
Merge commit 'stackprotector/auto-stackprotector-next'
Diffstat (limited to 'arch/x86/include/asm/system.h')
-rw-r--r-- | arch/x86/include/asm/system.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h index 07c3e4048991..f2025b0c69d4 100644 --- a/arch/x86/include/asm/system.h +++ b/arch/x86/include/asm/system.h @@ -95,6 +95,8 @@ do { \ ".globl thread_return\n" \ "thread_return:\n\t" \ "movq %%gs:%P[pda_pcurrent],%%rsi\n\t" \ + "movq %P[task_canary](%%rsi),%%r8\n\t" \ + "movq %%r8,%%gs:%P[pda_canary]\n\t" \ "movq %P[thread_info](%%rsi),%%r8\n\t" \ LOCK_PREFIX "btr %[tif_fork],%P[ti_flags](%%r8)\n\t" \ "movq %%rax,%%rdi\n\t" \ @@ -106,7 +108,9 @@ do { \ [ti_flags] "i" (offsetof(struct thread_info, flags)), \ [tif_fork] "i" (TIF_FORK), \ [thread_info] "i" (offsetof(struct task_struct, stack)), \ - [pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent)) \ + [task_canary] "i" (offsetof(struct task_struct, stack_canary)),\ + [pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent)), \ + [pda_canary] "i" (offsetof(struct x8664_pda, stack_canary))\ : "memory", "cc" __EXTRA_CLOBBER) #endif |