Accepting request 971036 from home:polslinux:branches:Kernel:kdump
- Update to 1.7.1: * support for kernel up to 5.17 * sadump: remove variable length array * print error when reading with unsupported compression - Drop upstreamed makedumpfile-sadump-kaslr-fix-kaslr_offset-calculation.patch OBS-URL: https://build.opensuse.org/request/show/971036 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=164
This commit is contained in:
parent
0d9ecd57e6
commit
fc54b30a87
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8985f8df249087ea68c6051dec6dac3ef0703fe2aa87d0266f3951f93aa8da5e
|
|
||||||
size 202820
|
|
3
makedumpfile-1.7.1.tar.gz
Normal file
3
makedumpfile-1.7.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cb04b1bd0e750d0d0ac1b43b759b326d4a3797b0af08e0c269d1b155893fb664
|
||||||
|
size 204593
|
@ -9,8 +9,10 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
|||||||
elf_info.h | 4 ++++
|
elf_info.h | 4 ++++
|
||||||
1 file changed, 4 insertions(+)
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
--- a/elf_info.h
|
Index: makedumpfile-1.7.1/elf_info.h
|
||||||
+++ b/elf_info.h
|
===================================================================
|
||||||
|
--- makedumpfile-1.7.1.orig/elf_info.h
|
||||||
|
+++ makedumpfile-1.7.1/elf_info.h
|
||||||
@@ -19,6 +19,10 @@
|
@@ -19,6 +19,10 @@
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -10,9 +10,11 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
|||||||
Makefile | 4 +++-
|
Makefile | 4 +++-
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
--- a/Makefile
|
Index: makedumpfile-1.7.1/Makefile
|
||||||
+++ b/Makefile
|
===================================================================
|
||||||
@@ -66,6 +66,8 @@ LIBS := -lsnappy $(LIBS)
|
--- makedumpfile-1.7.1.orig/Makefile
|
||||||
|
+++ makedumpfile-1.7.1/Makefile
|
||||||
|
@@ -82,6 +82,8 @@ CFLAGS += -fsanitize=undefined
|
||||||
#CFLAGS += -fanalyzer
|
#CFLAGS += -fanalyzer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -21,12 +23,12 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
|||||||
LIBS := $(LIBS) -lpthread
|
LIBS := $(LIBS) -lpthread
|
||||||
|
|
||||||
try-run = $(shell set -e; \
|
try-run = $(shell set -e; \
|
||||||
@@ -101,7 +103,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
|
@@ -120,7 +122,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
|
||||||
gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
|
$(VPATH)makedumpfile.conf.5.in > $(VPATH)makedumpfile.conf.5
|
||||||
|
|
||||||
eppic_makedumpfile.so: extension_eppic.c
|
eppic_makedumpfile.so: extension_eppic.c
|
||||||
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo
|
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo
|
||||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic ${TINFOLIB}
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic ${TINFOLIB}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz
|
rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8 makedumpfile.conf.5
|
||||||
|
@ -12,10 +12,11 @@ Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
|||||||
makedumpfile.c | 4 ++++
|
makedumpfile.c | 4 ++++
|
||||||
makedumpfile.h | 3 +++
|
makedumpfile.h | 3 +++
|
||||||
3 files changed, 9 insertions(+), 1 deletion(-)
|
3 files changed, 9 insertions(+), 1 deletion(-)
|
||||||
diff -ur a/arch/ppc64.c b/arch/ppc64.c
|
Index: makedumpfile-1.7.1/arch/ppc64.c
|
||||||
--- a/arch/ppc64.c 2018-12-04 21:21:52.000000000 +0100
|
===================================================================
|
||||||
+++ b/arch/ppc64.c 2019-07-05 11:25:20.318510887 +0200
|
--- makedumpfile-1.7.1.orig/arch/ppc64.c
|
||||||
@@ -248,7 +248,9 @@
|
+++ makedumpfile-1.7.1/arch/ppc64.c
|
||||||
|
@@ -248,7 +248,9 @@ ppc64_vmalloc_init(void)
|
||||||
|
|
||||||
if (info->kernel_version >= KERNEL_VERSION(4, 12, 0)) {
|
if (info->kernel_version >= KERNEL_VERSION(4, 12, 0)) {
|
||||||
info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
|
info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
|
||||||
@ -26,10 +27,11 @@ diff -ur a/arch/ppc64.c b/arch/ppc64.c
|
|||||||
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_17;
|
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_17;
|
||||||
else
|
else
|
||||||
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;
|
info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;
|
||||||
diff -ur a/makedumpfile.c b/makedumpfile.c
|
Index: makedumpfile-1.7.1/makedumpfile.c
|
||||||
--- a/makedumpfile.c 2018-12-04 21:21:52.000000000 +0100
|
===================================================================
|
||||||
+++ b/makedumpfile.c 2019-07-05 11:23:32.357093984 +0200
|
--- makedumpfile-1.7.1.orig/makedumpfile.c
|
||||||
@@ -2296,6 +2296,8 @@
|
+++ makedumpfile-1.7.1/makedumpfile.c
|
||||||
|
@@ -2491,6 +2491,8 @@ write_vmcoreinfo_data(void)
|
||||||
WRITE_NUMBER_UNSIGNED("kimage_voffset", kimage_voffset);
|
WRITE_NUMBER_UNSIGNED("kimage_voffset", kimage_voffset);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -38,7 +40,7 @@ diff -ur a/makedumpfile.c b/makedumpfile.c
|
|||||||
if (info->phys_base)
|
if (info->phys_base)
|
||||||
fprintf(info->file_vmcoreinfo, "%s%lu\n", STR_NUMBER("phys_base"),
|
fprintf(info->file_vmcoreinfo, "%s%lu\n", STR_NUMBER("phys_base"),
|
||||||
info->phys_base);
|
info->phys_base);
|
||||||
@@ -2696,6 +2698,8 @@
|
@@ -2939,6 +2941,8 @@ read_vmcoreinfo(void)
|
||||||
|
|
||||||
READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
|
READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
|
||||||
|
|
||||||
@ -47,10 +49,11 @@ diff -ur a/makedumpfile.c b/makedumpfile.c
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff -ur a/makedumpfile.h b/makedumpfile.h
|
Index: makedumpfile-1.7.1/makedumpfile.h
|
||||||
--- a/makedumpfile.h 2018-12-04 21:21:52.000000000 +0100
|
===================================================================
|
||||||
+++ b/makedumpfile.h 2019-07-05 11:23:32.353093931 +0200
|
--- makedumpfile-1.7.1.orig/makedumpfile.h
|
||||||
@@ -1936,6 +1936,9 @@
|
+++ makedumpfile-1.7.1/makedumpfile.h
|
||||||
|
@@ -2069,6 +2069,9 @@ struct number_table {
|
||||||
unsigned long PHYS_OFFSET;
|
unsigned long PHYS_OFFSET;
|
||||||
unsigned long kimage_voffset;
|
unsigned long kimage_voffset;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
From: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
|
|
||||||
Date: Tue Jan 25 12:55:15 2022 +0000
|
|
||||||
Subject: sadump, kaslr: fix failure of calculating kaslr_offset
|
|
||||||
References: bsc#1196736
|
|
||||||
Upstream: merged
|
|
||||||
Git-commit: 59b1726fbcc251155140c8a1972384498fee4daf
|
|
||||||
|
|
||||||
On kernels v5.8 or later, makedumpfile fails for memory dumps in the
|
|
||||||
sadump-related formats as follows:
|
|
||||||
|
|
||||||
# makedumpfile -f -l -d 31 -x ./vmlinux /dev/sdd4 /root/vmcore-ld31
|
|
||||||
__vtop4_x86_64: Can't get a valid pud_pte.
|
|
||||||
...110 lines of the same message...
|
|
||||||
__vtop4_x86_64: Can't get a valid pud_pte.
|
|
||||||
calc_kaslr_offset: failed to calculate kaslr_offset and phys_base; default to 0
|
|
||||||
readmem: type_addr: 1, addr:ffffffff85411858, size:8
|
|
||||||
__vtop4_x86_64: Can't get pgd (page_dir:ffffffff85411858).
|
|
||||||
readmem: Can't convert a virtual address(ffffffff059be980) to physical address.
|
|
||||||
readmem: type_addr: 0, addr:ffffffff059be980, size:1024
|
|
||||||
cpu_online_mask_init: Can't read cpu_online_mask memory.
|
|
||||||
|
|
||||||
makedumpfile Failed.
|
|
||||||
|
|
||||||
This is caused by the kernel commit 9d06c4027f21 ("x86/entry: Convert
|
|
||||||
Divide Error to IDTENTRY") that renamed divide_error to
|
|
||||||
asm_exc_divide_error, breaking logic for calculating kaslr offset.
|
|
||||||
|
|
||||||
Fix this by adding initialization of asm_exc_divide_error.
|
|
||||||
|
|
||||||
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
|
|
||||||
Acked-by: Petr Tesarik <ptesarik@suse.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
makedumpfile.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
--- a/makedumpfile.c
|
|
||||||
+++ b/makedumpfile.c
|
|
||||||
@@ -1634,6 +1634,8 @@ get_symbol_info(void)
|
|
||||||
SYMBOL_INIT(cur_cpu_spec, "cur_cpu_spec");
|
|
||||||
|
|
||||||
SYMBOL_INIT(divide_error, "divide_error");
|
|
||||||
+ if (SYMBOL(divide_error) == NOT_FOUND_SYMBOL)
|
|
||||||
+ SYMBOL_INIT(divide_error, "asm_exc_divide_error");
|
|
||||||
SYMBOL_INIT(idt_table, "idt_table");
|
|
||||||
SYMBOL_INIT(saved_command_line, "saved_command_line");
|
|
||||||
SYMBOL_INIT(pti_init, "pti_init");
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 20 08:55:43 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>
|
||||||
|
|
||||||
|
- Update to 1.7.1:
|
||||||
|
* support for kernel up to 5.17
|
||||||
|
* sadump: remove variable length array
|
||||||
|
* print error when reading with unsupported compression
|
||||||
|
- Drop upstreamed makedumpfile-sadump-kaslr-fix-kaslr_offset-calculation.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 21 11:22:52 UTC 2022 - Petr Tesařík <ptesarik@suse.com>
|
Mon Mar 21 11:22:52 UTC 2022 - Petr Tesařík <ptesarik@suse.com>
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
# End of compatibility cruft
|
# End of compatibility cruft
|
||||||
|
|
||||||
Name: makedumpfile
|
Name: makedumpfile
|
||||||
Version: 1.7.0
|
Version: 1.7.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Partial kernel dump
|
Summary: Partial kernel dump
|
||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
@ -51,7 +51,6 @@ Source99: %{name}-rpmlintrc
|
|||||||
Patch0: %{name}-override-libtinfo.patch
|
Patch0: %{name}-override-libtinfo.patch
|
||||||
Patch1: %{name}-ppc64-VA-range-SUSE.patch
|
Patch1: %{name}-ppc64-VA-range-SUSE.patch
|
||||||
Patch2: %{name}-PN_XNUM.patch
|
Patch2: %{name}-PN_XNUM.patch
|
||||||
Patch3: %{name}-sadump-kaslr-fix-kaslr_offset-calculation.patch
|
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: libbz2-devel
|
||||||
BuildRequires: libdw-devel
|
BuildRequires: libdw-devel
|
||||||
BuildRequires: libelf-devel
|
BuildRequires: libelf-devel
|
||||||
@ -76,11 +75,7 @@ and can compress the page data. The obtained dump file can by analyzed
|
|||||||
via gdb or crash utility.
|
via gdb or crash utility.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags} -fcommon"
|
export CFLAGS="%{optflags} -fcommon"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user