~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/panic.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_PANIC_H
  3 #define _LINUX_PANIC_H
  4 
  5 #include <linux/compiler_attributes.h>
  6 #include <linux/types.h>
  7 
  8 struct pt_regs;
  9 
 10 extern long (*panic_blink)(int state);
 11 __printf(1, 2)
 12 void panic(const char *fmt, ...) __noreturn __cold;
 13 void nmi_panic(struct pt_regs *regs, const char *msg);
 14 void check_panic_on_warn(const char *origin);
 15 extern void oops_enter(void);
 16 extern void oops_exit(void);
 17 extern bool oops_may_print(void);
 18 
 19 extern bool panic_triggering_all_cpu_backtrace;
 20 extern int panic_timeout;
 21 extern unsigned long panic_print;
 22 extern int panic_on_oops;
 23 extern int panic_on_unrecovered_nmi;
 24 extern int panic_on_io_nmi;
 25 extern int panic_on_warn;
 26 
 27 extern unsigned long panic_on_taint;
 28 extern bool panic_on_taint_nousertaint;
 29 
 30 extern int sysctl_panic_on_rcu_stall;
 31 extern int sysctl_max_rcu_stall_to_panic;
 32 extern int sysctl_panic_on_stackoverflow;
 33 
 34 extern bool crash_kexec_post_notifiers;
 35 
 36 extern void __stack_chk_fail(void);
 37 void abort(void);
 38 
 39 /*
 40  * panic_cpu is used for synchronizing panic() and crash_kexec() execution. It
 41  * holds a CPU number which is executing panic() currently. A value of
 42  * PANIC_CPU_INVALID means no CPU has entered panic() or crash_kexec().
 43  */
 44 extern atomic_t panic_cpu;
 45 #define PANIC_CPU_INVALID       -1
 46 
 47 /*
 48  * Only to be used by arch init code. If the user over-wrote the default
 49  * CONFIG_PANIC_TIMEOUT, honor it.
 50  */
 51 static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout)
 52 {
 53         if (panic_timeout == arch_default_timeout)
 54                 panic_timeout = timeout;
 55 }
 56 
 57 /* This cannot be an enum because some may be used in assembly source. */
 58 #define TAINT_PROPRIETARY_MODULE        0
 59 #define TAINT_FORCED_MODULE             1
 60 #define TAINT_CPU_OUT_OF_SPEC           2
 61 #define TAINT_FORCED_RMMOD              3
 62 #define TAINT_MACHINE_CHECK             4
 63 #define TAINT_BAD_PAGE                  5
 64 #define TAINT_USER                      6
 65 #define TAINT_DIE                       7
 66 #define TAINT_OVERRIDDEN_ACPI_TABLE     8
 67 #define TAINT_WARN                      9
 68 #define TAINT_CRAP                      10
 69 #define TAINT_FIRMWARE_WORKAROUND       11
 70 #define TAINT_OOT_MODULE                12
 71 #define TAINT_UNSIGNED_MODULE           13
 72 #define TAINT_SOFTLOCKUP                14
 73 #define TAINT_LIVEPATCH                 15
 74 #define TAINT_AUX                       16
 75 #define TAINT_RANDSTRUCT                17
 76 #define TAINT_TEST                      18
 77 #define TAINT_FLAGS_COUNT               19
 78 #define TAINT_FLAGS_MAX                 ((1UL << TAINT_FLAGS_COUNT) - 1)
 79 
 80 struct taint_flag {
 81         char c_true;            /* character printed when tainted */
 82         char c_false;           /* character printed when not tainted */
 83         bool module;            /* also show as a per-module taint flag */
 84         const char *desc;       /* verbose description of the set taint flag */
 85 };
 86 
 87 extern const struct taint_flag taint_flags[TAINT_FLAGS_COUNT];
 88 
 89 enum lockdep_ok {
 90         LOCKDEP_STILL_OK,
 91         LOCKDEP_NOW_UNRELIABLE,
 92 };
 93 
 94 extern const char *print_tainted(void);
 95 extern const char *print_tainted_verbose(void);
 96 extern void add_taint(unsigned flag, enum lockdep_ok);
 97 extern int test_taint(unsigned flag);
 98 extern unsigned long get_taint(void);
 99 
100 #endif  /* _LINUX_PANIC_H */
101 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php