From: Takao Indoh <indou.takao@jp.fujitsu.com>
To: ats-kumagai@wm.jp.nec.com, d.hatayama@jp.fujitsu.com
Cc: kexec@lists.infradead.org
Subject: [makedumpfile PATCH v2 1/3] Support symbol __cpu_online_mask
Date: Mon, 16 Oct 2017 18:42:15 +0900 [thread overview]
Message-ID: <20171016094217.1020-2-indou.takao@jp.fujitsu.com> (raw)
In-Reply-To: <20171016094217.1020-1-indou.takao@jp.fujitsu.com>
In the upstream kernel, by commit 5aec01b83 cpu_online_mask was replaced
with macros and new variables __cpu_online_mask was added instead of it.
Sadump uses cpu_online_mask to check the cpu was online or not,
therefore it also need __cpu_online_mask symbol for this in the latest
kernel.
Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
---
makedumpfile.c | 9 +++++++--
makedumpfile.h | 1 +
sadump_info.c | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index 567ac5d..5f2ca7d 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -1519,8 +1519,13 @@ get_symbol_info(void)
SYMBOL_INIT(__per_cpu_load, "__per_cpu_load");
SYMBOL_INIT(__per_cpu_offset, "__per_cpu_offset");
SYMBOL_INIT(cpu_online_mask, "cpu_online_mask");
- if (SYMBOL(cpu_online_mask) == NOT_FOUND_SYMBOL)
- SYMBOL_INIT(cpu_online_mask, "cpu_online_map");
+ SYMBOL_INIT(__cpu_online_mask, "__cpu_online_mask");
+ if (SYMBOL(cpu_online_mask) == NOT_FOUND_SYMBOL) {
+ if (SYMBOL(__cpu_online_mask) == NOT_FOUND_SYMBOL)
+ SYMBOL_INIT(cpu_online_mask, "cpu_online_map");
+ else
+ SYMBOL_INIT(cpu_online_mask, "__cpu_online_mask");
+ }
SYMBOL_INIT(kexec_crash_image, "kexec_crash_image");
SYMBOL_INIT(node_remap_start_vaddr, "node_remap_start_vaddr");
SYMBOL_INIT(node_remap_end_vaddr, "node_remap_end_vaddr");
diff --git a/makedumpfile.h b/makedumpfile.h
index f4ba02d..704a6bc 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -1596,6 +1596,7 @@ struct symbol_table {
unsigned long long __per_cpu_offset;
unsigned long long __per_cpu_load;
unsigned long long cpu_online_mask;
+ unsigned long long __cpu_online_mask;
unsigned long long kexec_crash_image;
/*
diff --git a/sadump_info.c b/sadump_info.c
index 257f1be..7dd22e7 100644
--- a/sadump_info.c
+++ b/sadump_info.c
@@ -953,7 +953,8 @@ cpu_online_mask_init(void)
return FALSE;
}
- if (SIZE(cpumask) == NOT_FOUND_STRUCTURE)
+ if ((SIZE(cpumask) == NOT_FOUND_STRUCTURE) ||
+ (SYMBOL(__cpu_online_mask) != NOT_FOUND_SYMBOL))
cpu_online_mask_addr = SYMBOL(cpu_online_mask);
else {
--
2.9.5
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2017-10-16 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 9:42 [makedumpfile PATCH v2 0/3] Fix KASLR problem on sadump Takao Indoh
2017-10-16 9:42 ` Takao Indoh [this message]
2017-10-16 9:42 ` [makedumpfile PATCH v2 2/3] Introduce vtop4_x86_64_pagetable Takao Indoh
2017-10-16 9:42 ` [makedumpfile PATCH v2 3/3] sadump: Fix a KASLR problem of sadump Takao Indoh
2017-10-26 0:16 ` Atsushi Kumagai
2017-10-26 1:19 ` Takao Indoh
2017-10-24 10:00 ` [makedumpfile PATCH v2 0/3] Fix KASLR problem on sadump Takao Indoh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171016094217.1020-2-indou.takao@jp.fujitsu.com \
--to=indou.takao@jp.fujitsu.com \
--cc=ats-kumagai@wm.jp.nec.com \
--cc=d.hatayama@jp.fujitsu.com \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox