Hello community,

here is the log from the commit of package makedumpfile for openSUSE:Factory 
checked in at 2020-04-10 23:52:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/makedumpfile (Old)
 and      /work/SRC/openSUSE:Factory/.makedumpfile.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "makedumpfile"

Fri Apr 10 23:52:27 2020 rev:77 rq:791930 version:1.6.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/makedumpfile/makedumpfile.changes        
2020-03-19 19:49:59.720173583 +0100
+++ /work/SRC/openSUSE:Factory/.makedumpfile.new.3248/makedumpfile.changes      
2020-04-10 23:52:38.456671874 +0200
@@ -1,0 +2,14 @@
+Fri Apr  3 05:51:49 UTC 2020 - Martin Liška <[email protected]>
+
+- Add -fcommon in order to fix boo#1160282.
+
+-------------------------------------------------------------------
+Wed Apr  1 06:11:18 UTC 2020 - Michal Suchanek <[email protected]>
+
+- Refresh patch with upstream version
+  - makedumpfile-arm64-VA-range-SUSE.patch
+  + makedumpfile-arm64-Align-PMD_SECTION_MASK-with-PHYS_MASK.patch
+- makedumpfile-Fix-cd_header-offset-overflow-with-large-pfn.patch: Fix integer
+  overflow with large memory configuration (bsc#1168234).
+
+-------------------------------------------------------------------

Old:
----
  makedumpfile-arm64-VA-range-SUSE.patch

New:
----
  makedumpfile-Fix-cd_header-offset-overflow-with-large-pfn.patch
  makedumpfile-arm64-Align-PMD_SECTION_MASK-with-PHYS_MASK.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ makedumpfile.spec ++++++
--- /var/tmp/diff_new_pack.r0nKjG/_old  2020-04-10 23:52:40.712673528 +0200
+++ /var/tmp/diff_new_pack.r0nKjG/_new  2020-04-10 23:52:40.716673531 +0200
@@ -43,7 +43,8 @@
 Patch1:         %{name}-override-libtinfo.patch
 Patch2:         %{name}-ppc64-VA-range-SUSE.patch
 Patch3:         %{name}-PN_XNUM.patch
-Patch4:         %{name}-arm64-VA-range-SUSE.patch
+Patch4:         %{name}-arm64-Align-PMD_SECTION_MASK-with-PHYS_MASK.patch
+Patch5:         %{name}-Fix-cd_header-offset-overflow-with-large-pfn.patch
 BuildRequires:  libdw-devel
 BuildRequires:  libelf-devel
 BuildRequires:  libeppic-devel
@@ -73,7 +74,7 @@
 %autopatch -p1
 
 %build
-export CFLAGS="%{optflags}"
+export CFLAGS="%{optflags} -fcommon"
 %if %{have_snappy}
 export USESNAPPY=on
 %endif

++++++ makedumpfile-Fix-cd_header-offset-overflow-with-large-pfn.patch ++++++
>From 6e4b2dfaed5e5e5c617e0e45f969c1f571c13e27 Mon Sep 17 00:00:00 2001
From: Jialong Chen <[email protected]>
Date: Mon, 23 Mar 2020 16:42:01 -0400
Subject: Fix cd_header offset overflow with large pfn
Upstream: merged (expected 1.6.8)
Git-commit: 6e4b2dfaed5e5e5c617e0e45f969c1f571c13e27

In function write_kdump_pages_and_bitmap_cyclic(), cd_header->offset is
calculated by the following formula:

    cd_header->offset
        = (DISKDUMP_HEADER_BLOCKS + dh->sub_hdr_size + dh->bitmap_blocks)
        * dh->block_size;

However, the variables of the right side are only int and unsigned int,
so if dh->bitmap_blocks is very large, it causes an interger overflow.

As a result, makedumpfile created a broken vmcore in a system with a
physical address range from 0x602770ecf000 to 0x6027ffffffff, and the
crash utility failed during session initialization, ending with the
error message "crash: vmlinux and vmcore do not match!".

Signed-off-by: Jialong Chen <[email protected]>
Signed-off-by: Kazuhito Hagio <[email protected]>
---
 diskdump_mod.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diskdump_mod.h b/diskdump_mod.h
index 267681712a2a..3733953dee12 100644
--- a/diskdump_mod.h
+++ b/diskdump_mod.h
@@ -22,7 +22,7 @@
 #define DISK_DUMP_SIGNATURE            "DISKDUMP"
 #define KDUMP_SIGNATURE                        "KDUMP   "
 #define SIG_LEN (sizeof(DUMP_PARTITION_SIGNATURE) - 1)
-#define DISKDUMP_HEADER_BLOCKS         (1)
+#define DISKDUMP_HEADER_BLOCKS         (1UL)
 
 /*
  * These are all remnants of the old "diskdump" facility,
-- 
2.23.0

++++++ makedumpfile-arm64-Align-PMD_SECTION_MASK-with-PHYS_MASK.patch ++++++
>From 7242ae4cb5288df626f464ced0a8b60fd669100b Mon Sep 17 00:00:00 2001
From: Michal Suchanek <[email protected]>
Date: Mon, 16 Mar 2020 19:39:58 +0100
Subject: Align PMD_SECTION_MASK with PHYS_MASK
Upstream: merged (expected 1.6.8)
Git-commit: 7242ae4cb5288df626f464ced0a8b60fd669100b

Reportedly on some arm64 systems makedumpfile loops forever exhausting
all memory when filtering kernel core. It turns out the reason is it
cannot resolve some addresses because the PMD mask is wrong. When
physical address mask allows up to 48bits pmd mask should allow the
same.
I suppose you would need a system that needs physical addresses over 1TB
to be able to reproduce this. This may be either because you have a lot
of memory or because the firmware mapped some memory above 1TB for some
reason.

Signed-off-by: Michal Suchanek <[email protected]>
---
 arch/arm64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64.c b/arch/arm64.c
index 43164ccc32d4..54d60b440850 100644
--- a/arch/arm64.c
+++ b/arch/arm64.c
@@ -81,7 +81,7 @@ static unsigned long kimage_voffset;
  * Remove the highest order bits that are not a part of the
  * physical address in a section
  */
-#define PMD_SECTION_MASK       ((1UL << 40) - 1)
+#define PMD_SECTION_MASK       ((1UL << PHYS_MASK_SHIFT) - 1)
 
 #define PMD_TYPE_MASK          3
 #define PMD_TYPE_SECT          1
-- 
2.23.0


Reply via email to