Accepting request 542108 from home:michals

- ppc64 Can't convert a virtual address (bsc#1067703)
  * Added patches: ppc64-update-hash-page-table-geometry.patch
                   book3s-ppc64-Lower-the-max-real-address-to-53-bits.patch
  * Refresh makedumpfile-Fix-SECTION_MAP_MASK-for-kernel-v.13.patch to also
    apply to SLE15 (4.12 kernel) due to backport of 2d070eab2e82 (bsc#1067703)

OBS-URL: https://build.opensuse.org/request/show/542108
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=110
This commit is contained in:
Lance Wang 2017-11-22 09:46:23 +00:00 committed by Git OBS Bridge
parent f12b80ef9b
commit cab31fc363
5 changed files with 151 additions and 3 deletions

View File

@ -2,9 +2,10 @@ From: Pratyush Anand <panand@redhat.com>
Date: Thu, 17 Aug 2017 12:47:13 +0900
Subject: [PATCH v2] Fix SECTION_MAP_MASK for kernel >= v.13
Patch-mainline: yes
References: bnc#1066811
References: bnc#1066811, bsc#1067703
* Required for kernel 4.13
* Required for SLE15 kernel due to backport of 2d070eab2e82 => 4.12
commit 2d070eab2e82 "mm: consider zone which is not fully populated to
have holes" added a new flag SECTION_IS_ONLINE and therefore
@ -30,7 +31,7 @@ index 8af0c9d6c2ac..509631994abc 100644
}
map = ULONG(mem_section + OFFSET(mem_section.section_mem_map));
- map &= SECTION_MAP_MASK;
+ if (info->kernel_version < KERNEL_VERSION(4, 13, 0))
+ if (info->kernel_version < KERNEL_VERSION(4, 12, 0))
+ map &= SECTION_MAP_MASK_4_12;
+ else
+ map &= SECTION_MAP_MASK;

View File

@ -0,0 +1,74 @@
From dc28bfc3213960b549bcc70f0d5379a6222d2c60 Mon Sep 17 00:00:00 2001
From: Bhupesh Sharma <bhsharma@redhat.com>
Date: Wed, 13 Sep 2017 05:04:00 +0900
Subject: [PATCH] [PATCH v2] book3s/ppc64: Lower the max real address to 53
bits for kernels >= v4.11
Patch-mainline: yes
References: bsc#1067703
* Required for kernel 4.11
Kernel commit 2f18d533757da3899f4bedab0b2c051b080079dc lowered the
max real address on ppc64 to 53 bits.
Make similar changes in makedumpfile (on basis of the underlying kernel
version), without which the makedumpfile will fail to create a dumpfile
and instead throw a SEGV fault as shown below on kernels >= v4.11:
# makedumpfile --split -d 31 -x vmlinux vmcore dumpfile_{1,2,3} 2>&1
The kernel version is not supported.
The makedumpfile operation may be incomplete.
[ 1196.252094] makedumpfile[2367]: unhandled signal 11 at
00000100f7011ca8 nip 000000001001eecc lr 000000001001f3c0 code 30001
Segmentation fault
Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
arch/ppc64.c | 8 +++++++-
makedumpfile.h | 5 +++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/ppc64.c b/arch/ppc64.c
index bacac778f73c..2f5a0daa16b2 100644
--- a/arch/ppc64.c
+++ b/arch/ppc64.c
@@ -307,11 +307,17 @@ ppc64_vmalloc_init(void)
}
info->pte_rpn_mask = PTE_RPN_MASK_DEFAULT;
- if (info->kernel_version >= KERNEL_VERSION(4, 6, 0)) {
+ if ((info->kernel_version >= KERNEL_VERSION(4, 6, 0)) &&
+ (info->kernel_version < KERNEL_VERSION(4, 11, 0))) {
info->pte_rpn_mask = PTE_RPN_MASK_L4_4_6;
info->pte_rpn_shift = PTE_RPN_SHIFT_L4_4_6;
}
+ if (info->kernel_version >= KERNEL_VERSION(4, 11, 0)) {
+ info->pte_rpn_mask = PTE_RPN_MASK_L4_4_11;
+ info->pte_rpn_shift = PTE_RPN_SHIFT_L4_4_11;
+ }
+
/*
* Compute ptrs per each level
*/
diff --git a/makedumpfile.h b/makedumpfile.h
index 7d81bbcf2234..f4ba02d11f09 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -692,6 +692,11 @@ unsigned long get_kvbase_arm64(void);
#define PUD_MASKED_BITS_4_7 0xc0000000000000ffUL
#define PMD_MASKED_BITS_4_7 0xc0000000000000ffUL
+#define PTE_RPN_SIZE_L4_4_11 53
+#define PTE_RPN_MASK_L4_4_11 \
+ (((1UL << PTE_RPN_SIZE_L4_4_11) - 1) & ~((1UL << info->page_shift) - 1))
+#define PTE_RPN_SHIFT_L4_4_11 info->page_shift
+
/*
* Supported MMU types
*/
--
2.13.6

View File

@ -0,0 +1,60 @@
From 13f48cbab7207d8247834453b55d45b2a95f65cb Mon Sep 17 00:00:00 2001
From: Hari Bathini <hbathini@linux.vnet.ibm.com>
Date: Sat, 11 Nov 2017 02:13:54 +0900
Subject: [PATCH] [PATCH] ppc64: update hash page table geometry
Patch-mainline: yes
References: bsc#1067703
* Required for kernel 4.12
Starting with kernel 4.12, BOOK3S hash page table geometry is updated
to accommodate larger virtual address range. Update here accordingly.
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
arch/ppc64.c | 12 +++++++++---
makedumpfile.h | 3 +++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/ppc64.c b/arch/ppc64.c
index 2f5a0daa16b2..8bdbcc583c47 100644
--- a/arch/ppc64.c
+++ b/arch/ppc64.c
@@ -245,10 +245,16 @@ ppc64_vmalloc_init(void)
} else if (info->kernel_version >= KERNEL_VERSION(4, 6, 0)) {
info->l1_index_size = PTE_INDEX_SIZE_L4_64K_3_10;
- info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_6;
- info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_6;
- info->l4_index_size = PGD_INDEX_SIZE_L4_64K_3_10;
+ if (info->kernel_version >= KERNEL_VERSION(4, 12, 0)) {
+ info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_12;
+ info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_12;
+ info->l4_index_size = PGD_INDEX_SIZE_L4_64K_4_12;
+ } else {
+ info->l2_index_size = PMD_INDEX_SIZE_L4_64K_4_6;
+ info->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_6;
+ info->l4_index_size = PGD_INDEX_SIZE_L4_64K_3_10;
+ }
} else if (info->kernel_version >= KERNEL_VERSION(3, 10, 0)) {
info->l1_index_size = PTE_INDEX_SIZE_L4_64K_3_10;
info->l2_index_size = PMD_INDEX_SIZE_L4_64K_3_10;
diff --git a/makedumpfile.h b/makedumpfile.h
index db753792bca6..b983aaf5ab03 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -670,6 +670,9 @@ unsigned long get_kvbase_arm64(void);
#define PGD_INDEX_SIZE_L4_64K_3_10 12
#define PMD_INDEX_SIZE_L4_64K_4_6 5
#define PUD_INDEX_SIZE_L4_64K_4_6 5
+#define PMD_INDEX_SIZE_L4_64K_4_12 10
+#define PUD_INDEX_SIZE_L4_64K_4_12 7
+#define PGD_INDEX_SIZE_L4_64K_4_12 8
#define PTE_INDEX_SIZE_RADIX_64K 5
#define PMD_INDEX_SIZE_RADIX_64K 9
#define PUD_INDEX_SIZE_RADIX_64K 9
--
2.13.6

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Nov 15 18:05:58 UTC 2017 - msuchanek@suse.com
- ppc64 Can't convert a virtual address (bsc#1067703)
* Added patches: ppc64-update-hash-page-table-geometry.patch
book3s-ppc64-Lower-the-max-real-address-to-53-bits.patch
* Refresh makedumpfile-Fix-SECTION_MAP_MASK-for-kernel-v.13.patch to also
apply to SLE15 (4.12 kernel) due to backport of 2d070eab2e82 (bsc#1067703)
-------------------------------------------------------------------
Fri Nov 10 17:01:33 HKT 2017 - lzwang@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package makedumpfile
#
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -41,6 +41,8 @@ Patch0: %{name}-coptflags.diff
Patch1: %{name}-Fix-SECTION_MAP_MASK-for-kernel-v.13.patch
Patch2: %{name}-override-libtinfo.patch
Patch3: %{name}-handle-renamed-init_level4_pgt-init_top_pgt.patch
Patch4: %{name}-ppc64-update-hash-page-table-geometry.patch
Patch5: %{name}-book3s-ppc64-Lower-the-max-real-address-to-53-bits.patch
BuildRequires: libdw-devel
BuildRequires: libebl-devel
BuildRequires: libelf-devel
@ -72,6 +74,8 @@ via gdb or crash utility.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%if %{have_snappy}