diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-28 20:28:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-28 20:28:41 -0500 |
commit | 707badb80b90d15d97f46155e6af432bd52789a3 (patch) | |
tree | 56f4aea5043aa4473e67412208b51230e497239a | |
parent | b6a10886442364ceb20115bb3836764a7d99a83b (diff) | |
parent | c547c77ee4d0408907847f64c403df1bf2f9c7a0 (diff) |
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
[PATCH] x86-64: Use stricter in process stack check for unwinder
[PATCH] i386: Fix compilation with UP genericarch
[PATCH] x86-64: Fix warning in io_apic.c
[PATCH] x86-64: work around gcc4 issue with -Os in Dwarf2 stack unwind
[PATCH] x86_64: Align data segment to PAGE_SIZE boundary
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/traps.c | 10 | ||||
-rw-r--r-- | include/asm-i386/mach-summit/mach_apic.h | 4 | ||||
-rw-r--r-- | kernel/unwind.c | 9 |
4 files changed, 18 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 14654e682411..c80081a6ba41 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -754,10 +754,8 @@ void __setup_vector_irq(int cpu) | |||
754 | { | 754 | { |
755 | /* Initialize vector_irq on a new cpu */ | 755 | /* Initialize vector_irq on a new cpu */ |
756 | /* This function must be called with vector_lock held */ | 756 | /* This function must be called with vector_lock held */ |
757 | unsigned long flags; | ||
758 | int irq, vector; | 757 | int irq, vector; |
759 | 758 | ||
760 | |||
761 | /* Mark the inuse vectors */ | 759 | /* Mark the inuse vectors */ |
762 | for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) { | 760 | for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) { |
763 | if (!cpu_isset(cpu, irq_domain[irq])) | 761 | if (!cpu_isset(cpu, irq_domain[irq])) |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index a153d0a01b72..0d65b22f229c 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -242,12 +242,19 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context) | |||
242 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack | 242 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack |
243 | */ | 243 | */ |
244 | 244 | ||
245 | static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | ||
246 | { | ||
247 | void *t = (void *)tinfo; | ||
248 | return p > t && p < t + THREAD_SIZE - 3; | ||
249 | } | ||
250 | |||
245 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, | 251 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, |
246 | struct stacktrace_ops *ops, void *data) | 252 | struct stacktrace_ops *ops, void *data) |
247 | { | 253 | { |
248 | const unsigned cpu = smp_processor_id(); | 254 | const unsigned cpu = smp_processor_id(); |
249 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; | 255 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; |
250 | unsigned used = 0; | 256 | unsigned used = 0; |
257 | struct thread_info *tinfo; | ||
251 | 258 | ||
252 | if (!tsk) | 259 | if (!tsk) |
253 | tsk = current; | 260 | tsk = current; |
@@ -370,7 +377,8 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s | |||
370 | /* | 377 | /* |
371 | * This handles the process stack: | 378 | * This handles the process stack: |
372 | */ | 379 | */ |
373 | HANDLE_STACK (((long) stack & (THREAD_SIZE-1)) != 0); | 380 | tinfo = current_thread_info(); |
381 | HANDLE_STACK (valid_stack_ptr(tinfo, stack)); | ||
374 | #undef HANDLE_STACK | 382 | #undef HANDLE_STACK |
375 | } | 383 | } |
376 | EXPORT_SYMBOL(dump_trace); | 384 | EXPORT_SYMBOL(dump_trace); |
diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index ef0671e5d5c5..43e5bd8f4a19 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h | |||
@@ -88,7 +88,11 @@ static inline void clustered_apic_check(void) | |||
88 | 88 | ||
89 | static inline int apicid_to_node(int logical_apicid) | 89 | static inline int apicid_to_node(int logical_apicid) |
90 | { | 90 | { |
91 | #ifdef CONFIG_SMP | ||
91 | return apicid_2_node[hard_smp_processor_id()]; | 92 | return apicid_2_node[hard_smp_processor_id()]; |
93 | #else | ||
94 | return 0; | ||
95 | #endif | ||
92 | } | 96 | } |
93 | 97 | ||
94 | /* Mapping from cpu number to logical apicid */ | 98 | /* Mapping from cpu number to logical apicid */ |
diff --git a/kernel/unwind.c b/kernel/unwind.c index f7e50d16dbf6..ed0a21d4a902 100644 --- a/kernel/unwind.c +++ b/kernel/unwind.c | |||
@@ -938,8 +938,11 @@ int unwind(struct unwind_frame_info *frame) | |||
938 | else { | 938 | else { |
939 | retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); | 939 | retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); |
940 | /* skip augmentation */ | 940 | /* skip augmentation */ |
941 | if (((const char *)(cie + 2))[1] == 'z') | 941 | if (((const char *)(cie + 2))[1] == 'z') { |
942 | ptr += get_uleb128(&ptr, end); | 942 | uleb128_t augSize = get_uleb128(&ptr, end); |
943 | |||
944 | ptr += augSize; | ||
945 | } | ||
943 | if (ptr > end | 946 | if (ptr > end |
944 | || retAddrReg >= ARRAY_SIZE(reg_info) | 947 | || retAddrReg >= ARRAY_SIZE(reg_info) |
945 | || REG_INVALID(retAddrReg) | 948 | || REG_INVALID(retAddrReg) |
@@ -963,9 +966,7 @@ int unwind(struct unwind_frame_info *frame) | |||
963 | if (cie == NULL || fde == NULL) { | 966 | if (cie == NULL || fde == NULL) { |
964 | #ifdef CONFIG_FRAME_POINTER | 967 | #ifdef CONFIG_FRAME_POINTER |
965 | unsigned long top, bottom; | 968 | unsigned long top, bottom; |
966 | #endif | ||
967 | 969 | ||
968 | #ifdef CONFIG_FRAME_POINTER | ||
969 | top = STACK_TOP(frame->task); | 970 | top = STACK_TOP(frame->task); |
970 | bottom = STACK_BOTTOM(frame->task); | 971 | bottom = STACK_BOTTOM(frame->task); |
971 | # if FRAME_RETADDR_OFFSET < 0 | 972 | # if FRAME_RETADDR_OFFSET < 0 |