diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 07:53:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 07:53:49 -0700 |
commit | b581af5110ab62db3a33f86ea7531d5f898a520c (patch) | |
tree | eef312788928ad26ab5687438903bf19f6aaa207 /arch/x86/include/asm/processor.h | |
parent | ffaf854b011bde97d63955a71232a20fe4382a38 (diff) | |
parent | 53f824520b6d84ca5b4a8fd71addc91dbf64357e (diff) | |
download | linux-b581af5110ab62db3a33f86ea7531d5f898a520c.tar.bz2 |
Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86/i386: Put aligned stack-canary in percpu shared_aligned section
x86/i386: Make sure stack-protector segment base is cache aligned
x86: Detect stack protector for i386 builds on x86_64
x86: allow "=rm" in native_save_fl()
x86: properly annotate alternatives.c
x86: Introduce GDT_ENTRY_INIT(), initialize bad_bios_desc statically
x86, 32-bit: Use generic sys_pipe()
x86: Introduce GDT_ENTRY_INIT(), fix APM
x86: Introduce GDT_ENTRY_INIT()
x86: Introduce set_desc_base() and set_desc_limit()
x86: Remove unused patch_espfix_desc()
x86: Use get_desc_base()
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index c7768269b1cf..ac7e79654f3a 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -403,7 +403,17 @@ extern unsigned long kernel_eflags; extern asmlinkage void ignore_sysret(void); #else /* X86_64 */ #ifdef CONFIG_CC_STACKPROTECTOR -DECLARE_PER_CPU(unsigned long, stack_canary); +/* + * Make sure stack canary segment base is cached-aligned: + * "For Intel Atom processors, avoid non zero segment base address + * that is not aligned to cache line boundary at all cost." + * (Optim Ref Manual Assembly/Compiler Coding Rule 15.) + */ +struct stack_canary { + char __pad[20]; /* canary at %gs:20 */ + unsigned long canary; +}; +DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); #endif #endif /* X86_64 */ |