mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 03:35:42 +07:00
b344e24a8e
We can't assume that if we execute the unwinder code and the unwinder was already running that it has faulted. Clearly two kernel threads can invoke the unwinder at the same time and may be running simultaneously. The previous approach used BUG() and BUG_ON() in the unwinder code to detect whether the unwinder was incapable of unwinding the stack, and that the next available unwinder should be used instead. A better approach is to explicitly invoke a trap handler to switch unwinders when the current unwinder cannot continue. Signed-off-by: Matt Fleming <matt@console-pimps.org>
32 lines
817 B
C
32 lines
817 B
C
#ifndef _LINUX_UNWINDER_H
|
|
#define _LINUX_UNWINDER_H
|
|
|
|
#include <asm/stacktrace.h>
|
|
|
|
struct unwinder {
|
|
const char *name;
|
|
struct list_head list;
|
|
int rating;
|
|
void (*dump)(struct task_struct *, struct pt_regs *,
|
|
unsigned long *, const struct stacktrace_ops *, void *);
|
|
};
|
|
|
|
extern int unwinder_init(void);
|
|
extern int unwinder_register(struct unwinder *);
|
|
|
|
extern void unwind_stack(struct task_struct *, struct pt_regs *,
|
|
unsigned long *, const struct stacktrace_ops *,
|
|
void *);
|
|
|
|
extern void stack_reader_dump(struct task_struct *, struct pt_regs *,
|
|
unsigned long *, const struct stacktrace_ops *,
|
|
void *);
|
|
|
|
/*
|
|
* Used by fault handling code to signal to the unwinder code that it
|
|
* should switch to a different unwinder.
|
|
*/
|
|
extern int unwinder_faulted;
|
|
|
|
#endif /* _LINUX_UNWINDER_H */
|