From: Eugen Hristev <[email protected]> Annotate vital static information into inspection table: - tainted_mask - taint_flags
Information on these variables is stored into dedicated meminspect section. Signed-off-by: Eugen Hristev <[email protected]> Signed-off-by: Mukesh Ojha <[email protected]> --- kernel/panic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/panic.c b/kernel/panic.c index 90e21f15fd7e..31d2e08b7e2b 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -37,6 +37,7 @@ #include <linux/context_tracking.h> #include <linux/seq_buf.h> #include <linux/sys_info.h> +#include <linux/meminspect.h> #include <trace/events/error_report.h> #include <asm/sections.h> #include <kunit/test-bug.h> @@ -58,6 +59,7 @@ static unsigned int __read_mostly sysctl_oops_all_cpu_backtrace; int panic_on_oops = IS_ENABLED(CONFIG_PANIC_ON_OOPS); static unsigned long tainted_mask = IS_ENABLED(CONFIG_RANDSTRUCT) ? (1 << TAINT_RANDSTRUCT) : 0; +MEMINSPECT_SIMPLE_ENTRY(tainted_mask); static int pause_on_oops; static int pause_on_oops_flag; static DEFINE_SPINLOCK(pause_on_oops_lock); @@ -833,6 +835,8 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = { TAINT_FLAG(FWCTL, 'J', ' '), }; +MEMINSPECT_SIMPLE_ENTRY(taint_flags); + #undef TAINT_FLAG static void print_tainted_seq(struct seq_buf *s, bool verbose) -- 2.53.0

