makedumpfile/makedumpfile-__cpu_online_mask-symbol.patch
Petr Tesařík 4877ee4b98 Accepting request 562833 from home:ptesarik:branches:Kernel:kdump
- makedumpfile-__cpu_online_mask-symbol.patch: Support symbol
  __cpu_online_mask (FATE#323473, bsc#1070291).
- makedumpfile-vtop4_x86_64_pagetable.patch: Introduce
  vtop4_x86_64_pagetable (FATE#323473, bsc#1070291).
- makedumpfile-fix-KASLR-for-sadump.patch: Fix a KASLR problem of
  sadump (FATE#323473, bsc#1070291).
- makedumpfile-fix-KASLR-for-sadump-while-kdump.patch: sadump: Fix
  a KASLR problem of sadump while kdump is working (FATE#323473,
  bsc#1070291).

OBS-URL: https://build.opensuse.org/request/show/562833
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=113
2018-01-09 10:34:26 +00:00

64 lines
2.2 KiB
Diff

From: Takao Indoh <indou.takao@jp.fujitsu.com>
Date: Thu, 26 Oct 2017 20:32:48 +0900
Subject: Support symbol __cpu_online_mask
References: FATE#323473, bsc#1070291
Upstream: merged
Git-commit: d6d5b443c82471818d43cb87c9280a0252e763e7
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>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
makedumpfile.c | 9 +++++++--
makedumpfile.h | 1 +
sadump_info.c | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
--- 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");
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -1590,6 +1590,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;
/*
--- 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 {