Accepting request 676209 from home:ptesarik:branches:Kernel:kdump

- makedumpfile-ppc64-VA-range-SUSE.patch: Use correct l3 index size
  with SLE15-SP1 ppc64le kernels (bsc#1123015).
- Update to 1.6.5
  * Improve support for arm64 system with KASLR
  * Support kernels up to 4.19.4

OBS-URL: https://build.opensuse.org/request/show/676209
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=130
This commit is contained in:
Petr Tesařík 2019-02-14 17:57:03 +00:00 committed by Git OBS Bridge
parent ce5792c70c
commit 157c060ed7
6 changed files with 81 additions and 7 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e06f72d5f291fcab9e92975f405a76e37d4f7fc8fa4172f199636398ae812b1
size 191786

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5d4f1d6ded8dca6951eeabcf4bb1ebf6575288fee947529397103c040eb5c760
size 193093

View File

@ -12,7 +12,7 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.com>
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,8 @@ LIBS := -lsnappy $(LIBS)
@@ -66,6 +66,8 @@ LIBS := -lsnappy $(LIBS)
CFLAGS += -DUSESNAPPY
endif
@ -20,8 +20,8 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.com>
+
LIBS := -lpthread $(LIBS)
all: makedumpfile
@@ -90,7 +92,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
try-run = $(shell set -e; \
@@ -101,7 +103,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
eppic_makedumpfile.so: extension_eppic.c

View File

@ -0,0 +1,59 @@
From: Petr Tesarik <ptesarik@suse.cz>
Subject: Use correct l3 index size with SLE15-SP1 ppc64le kernels
References: bsc#1123015
Upstream: never, SUSE-specific
SLE 15 SP1 backported commit c2b4d8b7417a ("powerpc/mm/hash64: Increase
the VA range"), to Linux 4.12, so let's check SUSE_PRODUCT_CODE.
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
arch/ppc64.c | 3 ++-
makedumpfile.c | 4 ++++
makedumpfile.h | 3 +++
3 files changed, 9 insertions(+), 1 deletion(-)
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -1936,6 +1936,9 @@ struct number_table {
unsigned long PHYS_OFFSET;
unsigned long kimage_voffset;
#endif
+
+ /* Distro-specific */
+ long SUSE_PRODUCT_CODE;
};
struct srcfile_table {
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -2296,6 +2296,8 @@ write_vmcoreinfo_data(void)
WRITE_NUMBER_UNSIGNED("kimage_voffset", kimage_voffset);
#endif
+ WRITE_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
+
if (info->phys_base)
fprintf(info->file_vmcoreinfo, "%s%lu\n", STR_NUMBER("phys_base"),
info->phys_base);
@@ -2696,6 +2698,8 @@ read_vmcoreinfo(void)
READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
+ READ_NUMBER("SUSE_PRODUCT_CODE", SUSE_PRODUCT_CODE);
+
return TRUE;
}
--- a/arch/ppc64.c
+++ b/arch/ppc64.c
@@ -248,7 +248,8 @@ ppc64_vmalloc_init(void)
if (info->kernel_version >= KERNEL_VERSION(4, 12, 0)) {
info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
- if (info->kernel_version >= KERNEL_VERSION(4, 17, 0))
+ if (info->kernel_version >= KERNEL_VERSION(4, 17, 0) ||
+ (NUMBER(SUSE_PRODUCT_CODE) & ~0xffL) == 0x010f0100)
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_17;
else
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Feb 14 17:41:26 UTC 2019 - ptesarik@suse.com
- makedumpfile-ppc64-VA-range-SUSE.patch: Use correct l3 index size
with SLE15-SP1 ppc64le kernels (bsc#1123015).
-------------------------------------------------------------------
Thu Feb 14 12:24:55 UTC 2019 - ptesarik@suse.com
- Update to 1.6.5
* Improve support for arm64 system with KASLR
* Support kernels up to 4.19.4
-------------------------------------------------------------------
Thu Jan 24 12:27:37 UTC 2019 - ptesarik@suse.com

View File

@ -32,7 +32,7 @@
# End of compatibility cruft
Name: makedumpfile
Version: 1.6.4
Version: 1.6.5
Release: 0
Summary: Partial kernel dump
License: GPL-2.0-only
@ -42,6 +42,7 @@ Source: https://sourceforge.net/projects/makedumpfile/files/makedumpfile
Source99: %{name}-rpmlintrc
Patch0: %{name}-coptflags.diff
Patch1: %{name}-override-libtinfo.patch
Patch2: %{name}-ppc64-VA-range-SUSE.patch
BuildRequires: libdw-devel
BuildRequires: libebl-devel
BuildRequires: libelf-devel
@ -71,6 +72,7 @@ via gdb or crash utility.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%if %{have_snappy}