stack overflow safe kdump (2.6.16-rc1-i386) - private nmi stack
PATCH 5/5 stack overflow safe kdump (2.6.16-rc1-i386) - private nmi stack
Use a private NMI stack.
Signed-off-by Fernando Vazquez <[email protected]>
---
arch/i386/kernel/irq.c +2 -5
@@ -37,11 +37,6 @@ void ack_bad_irq(unsigned int irq)/* * per-CPU IRQ handling contexts (thread information and stack) */ -union irq_ctx { -struct thread_info tinfo; -u32 stack[THREAD_SIZE /sizeof (u32)]; -}; -static union irq_ctx *hardirq_ctx[NR_CPUS ];static union irq_ctx *softirq_ctx[NR_CPUS ];#endif
@@ -154,6 +149,8 @@ void irq_ctx_init(int cpu)printk ("CPU %u irqstacks, hard=%p soft=%p\n" , cpu,hardirq_ctx[cpu],softirq_ctx[cpu]); + +nmi_ctx_init (cpu); }void irq_ctx_exit (int cpu)
arch/i386/kernel/traps.c +83 -0
102 lines not on this page · raw message
include/asm-i386/irq.h +11 -2
@@ -26,12 +26,21 @@ static __inline__ int irq_canonicalize(i#endif #ifdef CONFIG_4KSTACKS -extern void irq_ctx_init (int cpu); -extern void irq_ctx_exit (int cpu); +union irq_ctx { +struct thread_info tinfo; +u32 stack[THREAD_SIZE /sizeof (u32)]; +}; + +extern void irq_ctx_init (int cpu); +extern void irq_ctx_exit (int cpu); +extern void nmi_ctx_init (int cpu); +extern void nmi_ctx_exit (int cpu);# define __ARCH_HAS_DO_SOFTIRQ#else # define irq_ctx_init (cpu) do { } while (0)# define irq_ctx_exit (cpu) do { } while (0) +# define nmi_ctx_init (cpu) do { } while (0) +# define nmi_ctx_exit (cpu) do { } while (0)#endif #ifdef CONFIG_IRQBALANCE