for (unwind_start(&state, task, NULL, NULL);
!unwind_done(&state) && !unwind_error(&state);
unwind_next_frame(&state)) {
regs = unwind_get_entry_regs(&state, NULL); if (regs) { /* Success path for user tasks */ if (user_mode(regs)) return 0;
/* * Kernel mode registers on the stack indicate an * in-kernel interrupt or exception (e.g., preemption * or a page fault), which can make frame pointers * unreliable.
*/ if (IS_ENABLED(CONFIG_FRAME_POINTER)) return -EINVAL;
}
addr = unwind_get_return_address(&state);
/* * A NULL or invalid return address probably means there's some * generated code which __kernel_text_address() doesn't know * about.
*/ if (!addr) return -EINVAL;
if (!consume_entry(cookie, addr)) return -EINVAL;
}
/* Check for stack corruption */ if (unwind_error(&state)) return -EINVAL;
return 0;
}
/* Userspace stacktrace - based on kernel/trace/trace_sysprof.c */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.