#include <linux/kallsyms.h>
#include <linux/kprobes.h>
#include <linux/uaccess.h>
#include <linux/utsname.h>
#include <linux/hardirq.h>
#include <linux/kdebug.h>
#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/sched/debug.h>
#include <linux/sched/task_stack.h>
#include <linux/ftrace.h>
#include <linux/kexec.h>
#include <linux/bug.h>
#include <linux/nmi.h>
#include <linux/sysfs.h>
#include <linux/kasan.h>
#include <asm/cpu_entry_area.h>
#include <asm/stacktrace.h>
#include <asm/unwind.h>
int panic_on_unrecovered_nmi;
int panic_on_io_nmi;
static int die_counter;
static struct pt_regs exec_summary_regs;
bool noinstr in_task_stack(unsigned long *stack, struct task_struct *task,
struct stack_info *info)
{ … }
bool noinstr in_entry_stack(unsigned long *stack, struct stack_info *info)
{ … }
static void printk_stack_address(unsigned long address, int reliable,
const char *log_lvl)
{ … }
static int copy_code(struct pt_regs *regs, u8 *buf, unsigned long src,
unsigned int nbytes)
{ … }
void show_opcodes(struct pt_regs *regs, const char *loglvl)
{ … }
void show_ip(struct pt_regs *regs, const char *loglvl)
{ … }
void show_iret_regs(struct pt_regs *regs, const char *log_lvl)
{ … }
static void show_regs_if_on_stack(struct stack_info *info, struct pt_regs *regs,
bool partial, const char *log_lvl)
{ … }
__no_kmsan_checks
static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
unsigned long *stack, const char *log_lvl)
{ … }
void show_stack(struct task_struct *task, unsigned long *sp,
const char *loglvl)
{ … }
void show_stack_regs(struct pt_regs *regs)
{ … }
static arch_spinlock_t die_lock = …;
static int die_owner = …;
static unsigned int die_nest_count;
unsigned long oops_begin(void)
{ … }
NOKPROBE_SYMBOL(oops_begin);
void __noreturn rewind_stack_and_make_dead(int signr);
void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
{ … }
NOKPROBE_SYMBOL(oops_end);
static void __die_header(const char *str, struct pt_regs *regs, long err)
{ … }
NOKPROBE_SYMBOL(__die_header);
static int __die_body(const char *str, struct pt_regs *regs, long err)
{ … }
NOKPROBE_SYMBOL(__die_body);
int __die(const char *str, struct pt_regs *regs, long err)
{ … }
NOKPROBE_SYMBOL(__die);
void die(const char *str, struct pt_regs *regs, long err)
{ … }
void die_addr(const char *str, struct pt_regs *regs, long err, long gp_addr)
{ … }
void show_regs(struct pt_regs *regs)
{ … }