Release 2.0.17-2

Pull in makedumpfile 1.6.3
This commit is contained in:
Dave Young 2018-04-28 14:34:23 +08:00
parent 62999dab42
commit a95fcea412
4 changed files with 14 additions and 123 deletions

View File

@ -1,66 +0,0 @@
From: Pratyush Anand <panand@redhat.com>
To: ats-kumagai@wm.jp.nec.com
Subject: [Makedumpfile PATCH v2] Fix SECTION_MAP_MASK for kernel >= v.13
Date: Thu, 17 Aug 2017 09:16:59 +0530
Cc: Pratyush Anand <panand@redhat.com>, dyoung@redhat.com,
kexec@lists.infradead.org, bhe@redhat.com
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf-8
commit 2d070eab2e82 "mm: consider zone which is not fully populated to
have holes" added a new flag SECTION_IS_ONLINE and therefore
SECTION_MAP_MASK has been changed. We are not able to find correct
mem_map in makedumpfile for kernel version v4.13-rc1 and onward because
of the above kernel change.
This patch fixes the MASK value keeping the code backward compatible
Signed-off-by: Pratyush Anand <panand@redhat.com>
---
v1->v2: Improved kernel_version comparison to take care of stable kernel
versions as well.
makedumpfile.c | 5 ++++-
makedumpfile.h | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git kexec-tools-2.0.15/makedumpfile-1.6.2/makedumpfile.c kexec-tools-2.0.15.new/makedumpfile-1.6.2/makedumpfile.c
index 30230a15a2e7..c975651ca357 100644
--- kexec-tools-2.0.15/makedumpfile-1.6.2/makedumpfile.c
+++ kexec-tools-2.0.15.new/makedumpfile-1.6.2/makedumpfile.c
@@ -3304,7 +3304,10 @@ section_mem_map_addr(unsigned long addr)
return NOT_KV_ADDR;
}
map = ULONG(mem_section + OFFSET(mem_section.section_mem_map));
- map &= SECTION_MAP_MASK;
+ if (info->kernel_version < KERNEL_VERSION(4, 13, 0))
+ map &= SECTION_MAP_MASK_4_12;
+ else
+ map &= SECTION_MAP_MASK;
free(mem_section);
return map;
diff --git kexec-tools-2.0.15/makedumpfile-1.6.2/makedumpfile.h kexec-tools-2.0.15.new/makedumpfile-1.6.2/makedumpfile.h
index 8a05794843fb..322f28c632b0 100644
--- kexec-tools-2.0.15/makedumpfile-1.6.2/makedumpfile.h
+++ kexec-tools-2.0.15.new/makedumpfile-1.6.2/makedumpfile.h
@@ -183,7 +183,9 @@ isAnon(unsigned long mapping)
#define SECTIONS_PER_ROOT() (info->sections_per_root)
#define SECTION_ROOT_MASK() (SECTIONS_PER_ROOT() - 1)
#define SECTION_NR_TO_ROOT(sec) ((sec) / SECTIONS_PER_ROOT())
-#define SECTION_MAP_LAST_BIT (1UL<<2)
+#define SECTION_IS_ONLINE (1UL<<2)
+#define SECTION_MAP_LAST_BIT (1UL<<3)
+#define SECTION_MAP_MASK_4_12 (~(SECTION_IS_ONLINE-1))
#define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1))
#define NR_SECTION_ROOTS() divideup(num_section, SECTIONS_PER_ROOT())
#define SECTION_NR_TO_PFN(sec) ((sec) << PFN_SECTION_SHIFT())
--
2.9.4
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

View File

@ -1,43 +0,0 @@
Following commit renamed init_level4_pgt to init_top_pgt in kernel.
commit 65ade2f872b474fa8a04c2d397783350326634e6
Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Date: Tue Jun 6 14:31:27 2017 +0300
x86/boot/64: Rename init_level4_pgt and early_level4_pgt
This patch takes care of above kernel modification in makedumpfile.
Signed-off-by: Pratyush Anand <panand@redhat.com>
---
v2 -> v1
Removed redundant 'if condition' for WRITE_SYMBOL().
makedumpfile.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git kexec-tools-2.0.15/makedumpfile-1.6.2/makedumpfile.c kexec-tools-2.0.15.new/makedumpfile-1.6.2/makedumpfile.c
index f85003a33551..30230a15a2e7 100644
--- kexec-tools-2.0.15/makedumpfile-1.6.2/makedumpfile.c
+++ kexec-tools-2.0.15.new/makedumpfile-1.6.2/makedumpfile.c
@@ -1486,6 +1486,8 @@ get_symbol_info(void)
SYMBOL_INIT(_stext, "_stext");
SYMBOL_INIT(swapper_pg_dir, "swapper_pg_dir");
SYMBOL_INIT(init_level4_pgt, "init_level4_pgt");
+ if (SYMBOL(init_level4_pgt) == NOT_FOUND_SYMBOL)
+ SYMBOL_INIT(init_level4_pgt, "init_top_pgt");
SYMBOL_INIT(vmlist, "vmlist");
SYMBOL_INIT(vmap_area_list, "vmap_area_list");
SYMBOL_INIT(node_online_map, "node_online_map");
@@ -2500,6 +2502,8 @@ read_vmcoreinfo(void)
READ_SYMBOL("_stext", _stext);
READ_SYMBOL("swapper_pg_dir", swapper_pg_dir);
READ_SYMBOL("init_level4_pgt", init_level4_pgt);
+ if (SYMBOL(init_level4_pgt) == NOT_FOUND_SYMBOL)
+ READ_SYMBOL("init_top_pgt", init_level4_pgt);
READ_SYMBOL("vmlist", vmlist);
READ_SYMBOL("vmap_area_list", vmap_area_list);
READ_SYMBOL("node_online_map", node_online_map);
--
2.9.4

View File

@ -1,6 +1,6 @@
Name: kexec-tools Name: kexec-tools
Version: 2.0.17 Version: 2.0.17
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2 License: GPLv2
Group: Applications/System Group: Applications/System
Summary: The kexec/kdump userspace component Summary: The kexec/kdump userspace component
@ -13,7 +13,7 @@ Source4: kdump.sysconfig.i386
Source5: kdump.sysconfig.ppc64 Source5: kdump.sysconfig.ppc64
Source7: mkdumprd Source7: mkdumprd
Source8: kdump.conf Source8: kdump.conf
Source9: http://downloads.sourceforge.net/project/makedumpfile/makedumpfile/1.6.2/makedumpfile-1.6.2.tar.gz Source9: http://downloads.sourceforge.net/project/makedumpfile/makedumpfile/1.6.3/makedumpfile-1.6.3.tar.gz
Source10: kexec-kdump-howto.txt Source10: kexec-kdump-howto.txt
Source12: mkdumprd.8 Source12: mkdumprd.8
Source14: 98-kexec.rules Source14: 98-kexec.rules
@ -85,8 +85,6 @@ Obsoletes: diskdumputils netdump kexec-tools-eppic
# Patches 601 onward are generic patches # Patches 601 onward are generic patches
# #
Patch601: kexec-tools-2.0.3-disable-kexec-test.patch Patch601: kexec-tools-2.0.3-disable-kexec-test.patch
Patch602: kexec-tools-2.0.15-makedumpfile-take-care-of-init-level4-pgt-rename-in-kernel.patch
Patch603: kexec-tools-2.0.15-makedumpfile-fix-SECTION_MAP_MASK-for-kernel-bigger-than-4.13.patch
Patch604: kexec-tools-2.0.16-koji-build-fail-workaround.patch Patch604: kexec-tools-2.0.16-koji-build-fail-workaround.patch
%description %description
@ -111,8 +109,6 @@ tar -z -x -v -f %{SOURCE19}
tar -z -x -v -f %{SOURCE23} tar -z -x -v -f %{SOURCE23}
%patch601 -p1 %patch601 -p1
%patch602 -p1
%patch603 -p1
%patch604 -p1 %patch604 -p1
%ifarch ppc %ifarch ppc
@ -140,8 +136,8 @@ cp %{SOURCE27} .
make make
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64 %ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64
make -C eppic/libeppic make -C eppic/libeppic
make -C makedumpfile-1.6.2 LINKTYPE=dynamic USELZO=on USESNAPPY=on make -C makedumpfile-1.6.3 LINKTYPE=dynamic USELZO=on USESNAPPY=on
make -C makedumpfile-1.6.2 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so make -C makedumpfile-1.6.3 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so
%endif %endif
make -C kdump-anaconda-addon/po make -C kdump-anaconda-addon/po
@ -182,13 +178,13 @@ install -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_unitdir}/kdump.service
install -m 755 -D %{SOURCE22} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-generators/kdump-dep-generator.sh install -m 755 -D %{SOURCE22} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-generators/kdump-dep-generator.sh
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64 %ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64
install -m 755 makedumpfile-1.6.2/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile install -m 755 makedumpfile-1.6.3/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
install -m 644 makedumpfile-1.6.2/makedumpfile.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8.gz install -m 644 makedumpfile-1.6.3/makedumpfile.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8.gz
install -m 644 makedumpfile-1.6.2/makedumpfile.conf.5.gz $RPM_BUILD_ROOT/%{_mandir}/man5/makedumpfile.conf.5.gz install -m 644 makedumpfile-1.6.3/makedumpfile.conf.5.gz $RPM_BUILD_ROOT/%{_mandir}/man5/makedumpfile.conf.5.gz
install -m 644 makedumpfile-1.6.2/makedumpfile.conf $RPM_BUILD_ROOT/%{_sysconfdir}/makedumpfile.conf.sample install -m 644 makedumpfile-1.6.3/makedumpfile.conf $RPM_BUILD_ROOT/%{_sysconfdir}/makedumpfile.conf.sample
install -m 755 makedumpfile-1.6.2/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so install -m 755 makedumpfile-1.6.3/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so
mkdir -p $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/ mkdir -p $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
install -m 644 makedumpfile-1.6.2/eppic_scripts/* $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/ install -m 644 makedumpfile-1.6.3/eppic_scripts/* $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
%endif %endif
make -C kdump-anaconda-addon install DESTDIR=$RPM_BUILD_ROOT make -C kdump-anaconda-addon install DESTDIR=$RPM_BUILD_ROOT
%find_lang kdump-anaconda-addon %find_lang kdump-anaconda-addon
@ -318,6 +314,9 @@ done
%doc %doc
%changelog %changelog
* Sat Apr 28 2018 Dave Young <dyoung@redhat.com> - 2.0.17-1
- pull in makedumpfile 1.6.3
* Sat Apr 28 2018 Dave Young <dyoung@redhat.com> - 2.0.17-1 * Sat Apr 28 2018 Dave Young <dyoung@redhat.com> - 2.0.17-1
- pull in 2.0.17 - pull in 2.0.17

View File

@ -4,3 +4,4 @@ SHA512 (makedumpfile-1.6.2.tar.gz) = 436a787c9da7f0278289b22489936f0a06eb0cc5587
SHA512 (kexec-tools-2.0.16.tar.xz) = f2f06e7702fef20c8d7d6aabe1b264e2e2689e5c38cc00dbc2186dd7fa0479edb2dc9e307dd2ad7f03db47015e966e577f11576172604ef01c1bcca471fe2c24 SHA512 (kexec-tools-2.0.16.tar.xz) = f2f06e7702fef20c8d7d6aabe1b264e2e2689e5c38cc00dbc2186dd7fa0479edb2dc9e307dd2ad7f03db47015e966e577f11576172604ef01c1bcca471fe2c24
SHA512 (kdump-anaconda-addon-005-31-g31ab4b7.tar.gz) = d7d396c19ba9174ec64e72dfdf00e1c659143a849d5ce6aab73ae9f5270704e40914e11f2dd7650acc2d25c0ba41a0bbed75f2fe4a0746e9501f380eb98f3ea5 SHA512 (kdump-anaconda-addon-005-31-g31ab4b7.tar.gz) = d7d396c19ba9174ec64e72dfdf00e1c659143a849d5ce6aab73ae9f5270704e40914e11f2dd7650acc2d25c0ba41a0bbed75f2fe4a0746e9501f380eb98f3ea5
SHA512 (kexec-tools-2.0.17.tar.xz) = e0f254ca2b26fa02cb61ba9a0735423b26bac2693fbd920eaf7cc2822c298de958bd65f7c37947ca1f6811a3752a58f7cf8aa903494f0109ea76b7159a037fa6 SHA512 (kexec-tools-2.0.17.tar.xz) = e0f254ca2b26fa02cb61ba9a0735423b26bac2693fbd920eaf7cc2822c298de958bd65f7c37947ca1f6811a3752a58f7cf8aa903494f0109ea76b7159a037fa6
SHA512 (makedumpfile-1.6.3.tar.gz) = c213c944a2f578ecb37b234ef2354ee174a882d0eb354633d9941bd652704df1b111bab8bd94a31d7b045aade0f97962b1dfa5b0491217b4ab3896319ba291a4