#include <linux/debug_locks.h>
#include <linux/sched/debug.h>
#include <linux/interrupt.h>
#include <linux/kgdb.h>
#include <linux/kmsg_dump.h>
#include <linux/kallsyms.h>
#include <linux/notifier.h>
#include <linux/vt_kern.h>
#include <linux/module.h>
#include <linux/random.h>
#include <linux/ftrace.h>
#include <linux/reboot.h>
#include <linux/delay.h>
#include <linux/kexec.h>
#include <linux/panic_notifier.h>
#include <linux/sched.h>
#include <linux/string_helpers.h>
#include <linux/sysrq.h>
#include <linux/init.h>
#include <linux/nmi.h>
#include <linux/console.h>
#include <linux/bug.h>
#include <linux/ratelimit.h>
#include <linux/debugfs.h>
#include <linux/sysfs.h>
#include <linux/context_tracking.h>
#include <linux/seq_buf.h>
#include <trace/events/error_report.h>
#include <asm/sections.h>
#define PANIC_TIMER_STEP …
#define PANIC_BLINK_SPD …
#ifdef CONFIG_SMP
static unsigned int __read_mostly sysctl_oops_all_cpu_backtrace;
#else
#define sysctl_oops_all_cpu_backtrace …
#endif
int panic_on_oops = …;
static unsigned long tainted_mask = …;
static int pause_on_oops;
static int pause_on_oops_flag;
static DEFINE_SPINLOCK(pause_on_oops_lock);
bool crash_kexec_post_notifiers;
int panic_on_warn __read_mostly;
unsigned long panic_on_taint;
bool panic_on_taint_nousertaint = …;
static unsigned int warn_limit __read_mostly;
int panic_timeout = …;
EXPORT_SYMBOL_GPL(…);
#define PANIC_PRINT_TASK_INFO …
#define PANIC_PRINT_MEM_INFO …
#define PANIC_PRINT_TIMER_INFO …
#define PANIC_PRINT_LOCK_INFO …
#define PANIC_PRINT_FTRACE_INFO …
#define PANIC_PRINT_ALL_PRINTK_MSG …
#define PANIC_PRINT_ALL_CPU_BT …
#define PANIC_PRINT_BLOCKED_TASKS …
unsigned long panic_print;
ATOMIC_NOTIFIER_HEAD(…);
EXPORT_SYMBOL(…);
#ifdef CONFIG_SYSCTL
static struct ctl_table kern_panic_table[] = …;
static __init int kernel_panic_sysctls_init(void)
{ … }
late_initcall(kernel_panic_sysctls_init);
#endif
static atomic_t warn_count = …;
#ifdef CONFIG_SYSFS
static ssize_t warn_count_show(struct kobject *kobj, struct kobj_attribute *attr,
char *page)
{ … }
static struct kobj_attribute warn_count_attr = …;
static __init int kernel_panic_sysfs_init(void)
{ … }
late_initcall(kernel_panic_sysfs_init);
#endif
static long no_blink(int state)
{ … }
long (*panic_blink)(int state);
EXPORT_SYMBOL(…);
void __weak __noreturn panic_smp_self_stop(void)
{ … }
void __weak __noreturn nmi_panic_self_stop(struct pt_regs *regs)
{ … }
void __weak crash_smp_send_stop(void)
{ … }
atomic_t panic_cpu = …;
void nmi_panic(struct pt_regs *regs, const char *msg)
{ … }
EXPORT_SYMBOL(…);
static void panic_print_sys_info(bool console_flush)
{ … }
void check_panic_on_warn(const char *origin)
{ … }
static void panic_other_cpus_shutdown(bool crash_kexec)
{ … }
void panic(const char *fmt, ...)
{ … }
EXPORT_SYMBOL(…);
#define TAINT_FLAG …
const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = …;
#undef TAINT_FLAG
static void print_tainted_seq(struct seq_buf *s, bool verbose)
{ … }
static const char *_print_tainted(bool verbose)
{ … }
const char *print_tainted(void)
{ … }
const char *print_tainted_verbose(void)
{ … }
int test_taint(unsigned flag)
{ … }
EXPORT_SYMBOL(…);
unsigned long get_taint(void)
{ … }
void add_taint(unsigned flag, enum lockdep_ok lockdep_ok)
{ … }
EXPORT_SYMBOL(…);
static void spin_msec(int msecs)
{ … }
static void do_oops_enter_exit(void)
{ … }
bool oops_may_print(void)
{ … }
void oops_enter(void)
{ … }
static void print_oops_end_marker(void)
{ … }
void oops_exit(void)
{ … }
struct warn_args { … };
void __warn(const char *file, int line, void *caller, unsigned taint,
struct pt_regs *regs, struct warn_args *args)
{ … }
#ifdef CONFIG_BUG
#ifndef __WARN_FLAGS
void warn_slowpath_fmt(const char *file, int line, unsigned taint,
const char *fmt, ...)
{
bool rcu = warn_rcu_enter();
struct warn_args args;
pr_warn(CUT_HERE);
if (!fmt) {
__warn(file, line, __builtin_return_address(0), taint,
NULL, NULL);
warn_rcu_exit(rcu);
return;
}
args.fmt = fmt;
va_start(args.args, fmt);
__warn(file, line, __builtin_return_address(0), taint, NULL, &args);
va_end(args.args);
warn_rcu_exit(rcu);
}
EXPORT_SYMBOL(warn_slowpath_fmt);
#else
void __warn_printk(const char *fmt, ...)
{ … }
EXPORT_SYMBOL(…);
#endif
static int clear_warn_once_set(void *data, u64 val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static __init int register_warn_debugfs(void)
{ … }
device_initcall(register_warn_debugfs);
#endif
#ifdef CONFIG_STACKPROTECTOR
__visible noinstr void __stack_chk_fail(void)
{ … }
EXPORT_SYMBOL(…);
#endif
core_param(…);
core_param(…);
core_param(…);
core_param(…);
core_param(…);
static int __init oops_setup(char *s)
{ … }
early_param(…);
static int __init panic_on_taint_setup(char *s)
{ … }
early_param(…);