diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-09-03 17:31:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-04 01:10:31 -0400 |
commit | 53f824520b6d84ca5b4a8fd71addc91dbf64357e (patch) | |
tree | fc62733de8040f13cf450b6cae967976da31827b /arch/x86 | |
parent | 1ea0d14e480c245683927eecc03a70faf06e80c8 (diff) |
x86/i386: Put aligned stack-canary in percpu shared_aligned section
Pack aligned things together into a special section to minimize
padding holes.
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Tejun Heo <tj@kernel.org>
LKML-Reference: <4AA035C0.9070202@goop.org>
[ queued up in tip:x86/asm because it depends on this commit:
x86/i386: Make sure stack-protector segment base is cache aligned ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index e597ecc8753c..ac7e79654f3a 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -413,7 +413,7 @@ struct stack_canary { | |||
413 | char __pad[20]; /* canary at %gs:20 */ | 413 | char __pad[20]; /* canary at %gs:20 */ |
414 | unsigned long canary; | 414 | unsigned long canary; |
415 | }; | 415 | }; |
416 | DECLARE_PER_CPU(struct stack_canary, stack_canary) ____cacheline_aligned; | 416 | DECLARE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); |
417 | #endif | 417 | #endif |
418 | #endif /* X86_64 */ | 418 | #endif /* X86_64 */ |
419 | 419 | ||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 7d84bc4c1188..f23e236391a3 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1043,7 +1043,7 @@ DEFINE_PER_CPU(struct orig_ist, orig_ist); | |||
1043 | #else /* CONFIG_X86_64 */ | 1043 | #else /* CONFIG_X86_64 */ |
1044 | 1044 | ||
1045 | #ifdef CONFIG_CC_STACKPROTECTOR | 1045 | #ifdef CONFIG_CC_STACKPROTECTOR |
1046 | DEFINE_PER_CPU(struct stack_canary, stack_canary) ____cacheline_aligned; | 1046 | DEFINE_PER_CPU_ALIGNED(struct stack_canary, stack_canary); |
1047 | #endif | 1047 | #endif |
1048 | 1048 | ||
1049 | /* Make sure %fs and %gs are initialized properly in idle threads */ | 1049 | /* Make sure %fs and %gs are initialized properly in idle threads */ |