diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2024-05-31 12:04:57 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2024-06-24 22:25:05 -0700 |
| commit | 2f183c68345a26213e5e7f798399bee68d1c4a97 (patch) | |
| tree | 5d7d4456ce6c162f049c2d89614c2bae52195276 /include/linux/panic.h | |
| parent | f36fc96c15bd860776ffc66e53bdeeb791b6f442 (diff) | |
| download | linux-2f183c68345a26213e5e7f798399bee68d1c4a97.tar.gz linux-2f183c68345a26213e5e7f798399bee68d1c4a97.tar.bz2 linux-2f183c68345a26213e5e7f798399bee68d1c4a97.zip | |
kernel/panic: add verbose logging of kernel taints in backtraces
With nearly 20 taint flags and respective characters, it's getting a bit
difficult to remember what each taint flag character means. Add verbose
logging of the set taints in the format:
Tainted: [P]=PROPRIETARY_MODULE, [W]=WARN
in dump_stack_print_info() when there are taints.
Note that the "negative flag" G is not included.
Link: https://lkml.kernel.org/r/7321e306166cb2ca2807ab8639e665baa2462e9c.1717146197.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/panic.h')
| -rw-r--r-- | include/linux/panic.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/panic.h b/include/linux/panic.h index 6717b15e798c..3130e0b5116b 100644 --- a/include/linux/panic.h +++ b/include/linux/panic.h @@ -77,9 +77,10 @@ static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout) #define TAINT_FLAGS_MAX ((1UL << TAINT_FLAGS_COUNT) - 1) struct taint_flag { - char c_true; /* character printed when tainted */ - char c_false; /* character printed when not tainted */ - bool module; /* also show as a per-module taint flag */ + char c_true; /* character printed when tainted */ + char c_false; /* character printed when not tainted */ + bool module; /* also show as a per-module taint flag */ + const char *desc; /* verbose description of the set taint flag */ }; extern const struct taint_flag taint_flags[TAINT_FLAGS_COUNT]; @@ -90,6 +91,7 @@ enum lockdep_ok { }; extern const char *print_tainted(void); +extern const char *print_tainted_verbose(void); extern void add_taint(unsigned flag, enum lockdep_ok); extern int test_taint(unsigned flag); extern unsigned long get_taint(void); |
