[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250724135512.518487-28-eugen.hristev@linaro.org>
Date: Thu, 24 Jul 2025 16:55:10 +0300
From: Eugen Hristev <eugen.hristev@...aro.org>
To: linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
linux-arch@...r.kernel.org,
linux-mm@...ck.org,
tglx@...utronix.de,
andersson@...nel.org,
pmladek@...e.com
Cc: linux-arm-kernel@...ts.infradead.org,
linux-hardening@...r.kernel.org,
eugen.hristev@...aro.org,
corbet@....net,
mojha@....qualcomm.com,
rostedt@...dmis.org,
jonechou@...gle.com,
tudor.ambarus@...aro.org
Subject: [RFC][PATCH v2 27/29] kallsyms: Annotate static information into Kmemdump
Annotate vital static information into kmemdump:
- kallsysms_num_syms
- kallsyms_relative_base
- kallsysms_offsets
- kallsysms_names
- kallsyms_token_table
- kallsyms_token_index
- kallsyms_markers
- kallsyms_seqs_of_names
Information on these variables is stored into dedicated kmemdump section.
Signed-off-by: Eugen Hristev <eugen.hristev@...aro.org>
---
kernel/kallsyms.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 1e7635864124..442dc13d00cf 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -31,9 +31,19 @@
#include <linux/kernel.h>
#include <linux/bsearch.h>
#include <linux/btf_ids.h>
+#include <linux/kmemdump.h>
#include "kallsyms_internal.h"
+KMEMDUMP_VAR_CORE(kallsyms_num_syms, sizeof(kallsyms_num_syms));
+KMEMDUMP_VAR_CORE(kallsyms_relative_base, sizeof(kallsyms_relative_base));
+KMEMDUMP_VAR_CORE(kallsyms_offsets, sizeof(&kallsyms_offsets));
+KMEMDUMP_VAR_CORE(kallsyms_names, sizeof(&kallsyms_names));
+KMEMDUMP_VAR_CORE(kallsyms_token_table, sizeof(&kallsyms_token_table));
+KMEMDUMP_VAR_CORE(kallsyms_token_index, sizeof(&kallsyms_token_index));
+KMEMDUMP_VAR_CORE(kallsyms_markers, sizeof(&kallsyms_markers));
+KMEMDUMP_VAR_CORE(kallsyms_seqs_of_names, sizeof(&kallsyms_seqs_of_names));
+
/*
* Expand a compressed symbol data into the resulting uncompressed string,
* if uncompressed string is too long (>= maxlen), it will be truncated,
--
2.43.0
Powered by blists - more mailing lists