Loading arch/i386/kernel/traps.c +10 −6 Original line number Original line Diff line number Diff line Loading @@ -173,6 +173,8 @@ dump_trace_unwind(struct unwind_frame_info *info, void *data) return n; return n; } } #define MSG(msg) ops->warning(data, msg) void dump_trace(struct task_struct *task, struct pt_regs *regs, void dump_trace(struct task_struct *task, struct pt_regs *regs, unsigned long *stack, unsigned long *stack, struct stacktrace_ops *ops, void *data) struct stacktrace_ops *ops, void *data) Loading @@ -191,29 +193,31 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, if (unwind_init_frame_info(&info, task, regs) == 0) if (unwind_init_frame_info(&info, task, regs) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } else if (task == current) } else if (task == current) unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); else { else { if (unwind_init_blocked(&info, task) == 0) if (unwind_init_blocked(&info, task) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } } if (unw_ret > 0) { if (unw_ret > 0) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", UNW_PC(&info)); UNW_PC(&info)); if (UNW_SP(&info) >= PAGE_OFFSET) { if (UNW_SP(&info) >= PAGE_OFFSET) { ops->warning(data, "Leftover inexact backtrace:\n"); MSG("Leftover inexact backtrace:\n"); stack = (void *)UNW_SP(&info); stack = (void *)UNW_SP(&info); if (!stack) if (!stack) return; return; ebp = UNW_FP(&info); ebp = UNW_FP(&info); } else } else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else if (call_trace >= 1) } else if (call_trace >= 1) return; return; else else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else } else ops->warning(data, "Inexact backtrace:\n"); MSG("Inexact backtrace:\n"); } } if (!stack) { if (!stack) { unsigned long dummy; unsigned long dummy; Loading arch/x86_64/kernel/traps.c +13 −8 Original line number Original line Diff line number Diff line Loading @@ -235,6 +235,8 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context) return n; return n; } } #define MSG(txt) ops->warning(data, txt) /* /* * x86-64 can have upto three kernel stacks: * x86-64 can have upto three kernel stacks: * process stack * process stack Loading @@ -248,7 +250,8 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) return p > t && p < t + THREAD_SIZE - 3; return p > t && p < t + THREAD_SIZE - 3; } } void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack, struct stacktrace_ops *ops, void *data) struct stacktrace_ops *ops, void *data) { { const unsigned cpu = smp_processor_id(); const unsigned cpu = smp_processor_id(); Loading @@ -268,28 +271,30 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s if (unwind_init_frame_info(&info, tsk, regs) == 0) if (unwind_init_frame_info(&info, tsk, regs) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } else if (tsk == current) } else if (tsk == current) unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); else { else { if (unwind_init_blocked(&info, tsk) == 0) if (unwind_init_blocked(&info, tsk) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } } if (unw_ret > 0) { if (unw_ret > 0) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", UNW_PC(&info)); UNW_PC(&info)); if ((long)UNW_SP(&info) < 0) { if ((long)UNW_SP(&info) < 0) { ops->warning(data, "Leftover inexact backtrace:\n"); MSG("Leftover inexact backtrace:"); stack = (unsigned long *)UNW_SP(&info); stack = (unsigned long *)UNW_SP(&info); if (!stack) if (!stack) return; return; } else } else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else if (call_trace >= 1) } else if (call_trace >= 1) return; return; else else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else } else ops->warning(data, "Inexact backtrace:\n"); MSG("Inexact backtrace:\n"); } } if (!stack) { if (!stack) { unsigned long dummy; unsigned long dummy; Loading Loading
arch/i386/kernel/traps.c +10 −6 Original line number Original line Diff line number Diff line Loading @@ -173,6 +173,8 @@ dump_trace_unwind(struct unwind_frame_info *info, void *data) return n; return n; } } #define MSG(msg) ops->warning(data, msg) void dump_trace(struct task_struct *task, struct pt_regs *regs, void dump_trace(struct task_struct *task, struct pt_regs *regs, unsigned long *stack, unsigned long *stack, struct stacktrace_ops *ops, void *data) struct stacktrace_ops *ops, void *data) Loading @@ -191,29 +193,31 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, if (unwind_init_frame_info(&info, task, regs) == 0) if (unwind_init_frame_info(&info, task, regs) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } else if (task == current) } else if (task == current) unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); else { else { if (unwind_init_blocked(&info, task) == 0) if (unwind_init_blocked(&info, task) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } } if (unw_ret > 0) { if (unw_ret > 0) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", UNW_PC(&info)); UNW_PC(&info)); if (UNW_SP(&info) >= PAGE_OFFSET) { if (UNW_SP(&info) >= PAGE_OFFSET) { ops->warning(data, "Leftover inexact backtrace:\n"); MSG("Leftover inexact backtrace:\n"); stack = (void *)UNW_SP(&info); stack = (void *)UNW_SP(&info); if (!stack) if (!stack) return; return; ebp = UNW_FP(&info); ebp = UNW_FP(&info); } else } else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else if (call_trace >= 1) } else if (call_trace >= 1) return; return; else else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else } else ops->warning(data, "Inexact backtrace:\n"); MSG("Inexact backtrace:\n"); } } if (!stack) { if (!stack) { unsigned long dummy; unsigned long dummy; Loading
arch/x86_64/kernel/traps.c +13 −8 Original line number Original line Diff line number Diff line Loading @@ -235,6 +235,8 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context) return n; return n; } } #define MSG(txt) ops->warning(data, txt) /* /* * x86-64 can have upto three kernel stacks: * x86-64 can have upto three kernel stacks: * process stack * process stack Loading @@ -248,7 +250,8 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) return p > t && p < t + THREAD_SIZE - 3; return p > t && p < t + THREAD_SIZE - 3; } } void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack, struct stacktrace_ops *ops, void *data) struct stacktrace_ops *ops, void *data) { { const unsigned cpu = smp_processor_id(); const unsigned cpu = smp_processor_id(); Loading @@ -268,28 +271,30 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s if (unwind_init_frame_info(&info, tsk, regs) == 0) if (unwind_init_frame_info(&info, tsk, regs) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } else if (tsk == current) } else if (tsk == current) unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); else { else { if (unwind_init_blocked(&info, tsk) == 0) if (unwind_init_blocked(&info, tsk) == 0) unw_ret = dump_trace_unwind(&info, &oad); unw_ret = dump_trace_unwind(&info, &oad); } } if (unw_ret > 0) { if (unw_ret > 0) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { if (call_trace == 1 && !arch_unw_user_mode(&info)) { ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", ops->warning_symbol(data, "DWARF2 unwinder stuck at %s\n", UNW_PC(&info)); UNW_PC(&info)); if ((long)UNW_SP(&info) < 0) { if ((long)UNW_SP(&info) < 0) { ops->warning(data, "Leftover inexact backtrace:\n"); MSG("Leftover inexact backtrace:"); stack = (unsigned long *)UNW_SP(&info); stack = (unsigned long *)UNW_SP(&info); if (!stack) if (!stack) return; return; } else } else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else if (call_trace >= 1) } else if (call_trace >= 1) return; return; else else ops->warning(data, "Full inexact backtrace again:\n"); MSG("Full inexact backtrace again:\n"); } else } else ops->warning(data, "Inexact backtrace:\n"); MSG("Inexact backtrace:\n"); } } if (!stack) { if (!stack) { unsigned long dummy; unsigned long dummy; Loading