OBS User unknown 2008-10-24 13:50:16 +00:00 committed by Git OBS Bridge
parent 70a140fa82
commit b2c9f7c049
3 changed files with 66 additions and 1 deletions

View File

@ -0,0 +1,54 @@
From: Chandru <chandru@in.ibm.com>
Subject: kdump: check flags field from drconf memory
References: bnc#438086
X-Git-Id: 802a8a5e396e06a514251c44454c982bff3c5073
On a powerpc machine when memory is dynamically removed/added from an lpar, the
corresponding flags field in the drconf memory reflects the same with the bits
unset/set accordingly. The kernel does a check on these flags while booting.
Following are the similar changes brought in to kexec-tools. This makes
kexec-tools to skip those memory regions that do not belong or are not
assigned to the current partition ( but are available to dynamically add them
back ). Without this patch (and with memory remove operation) copying vmcore
fails with error as
Copying data : [ 84 %] readmem: Can't read the dump
memory(/proc/vmcore). Bad address
read_pfn: Can't get the page data.
Signed-off-by : Chandru S <chandru@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Bernhard Walle <bwalle@suse.de>
---
kexec/arch/ppc64/crashdump-ppc64.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -124,7 +124,7 @@ static void exclude_crash_region(uint64_
static int get_dyn_reconf_crash_memory_ranges()
{
uint64_t start, end;
- char fname[128], buf[32];
+ char fname[128], buf[32], flags;
FILE *file;
int i, n;
@@ -152,6 +152,13 @@ static int get_dyn_reconf_crash_memory_r
start = ((uint64_t *)buf)[0];
end = start + lmb_size;
+
+ flags = buf[23];
+ /* skip this block if the reserved bit is set in flags (0x80)
+ or if the memory region is not assigned to this partition (0x8) */
+ if ((flags & 0x80) || !(flags & 0x8))
+ continue;
+
if (start == 0 && end >= (BACKUP_SRC_END + 1))
start = BACKUP_SRC_END + 1;
exclude_crash_region(start, end);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 24 14:17:21 CEST 2008 - bwalle@suse.de
- Check for reserved and assigned bit flags on the memory regions
(bnc#438086).
-------------------------------------------------------------------
Sat Oct 18 22:25:59 CEST 2008 - bwalle@suse.de

View File

@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq
AutoReqProv: on
Summary: Tools for fast kernel loading
Version: 2.0.0
Release: 41
Release: 42
Source: %{name}-%{version}.tar.bz2
Source1: kexec-bootloader
Source2: kexec-bootloader.8.txt
@ -44,6 +44,7 @@ Patch6: %{name}-crash-memory-ranges-drconf.diff
Patch7: %{name}-add-usable-drconf-memory-node-to-device-tree.diff
Patch8: %{name}-get-details-dynamic-reconfiguration-memory-node.diff
Patch9: %{name}-device-tree-return.diff
Patch10: %{name}-ppc-check-flags.diff
Url: http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: zlib-devel
@ -80,6 +81,7 @@ Authors:
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%build
%{?suse_update_config -f}
@ -146,6 +148,9 @@ install -m 0755 kexec.init ${RPM_BUILD_ROOT}/etc/init.d/kexec
%endif
%changelog
* Fri Oct 24 2008 bwalle@suse.de
- Check for reserved and assigned bit flags on the memory regions
(bnc#438086).
* Sun Oct 19 2008 bwalle@suse.de
- Honor grubonce also when the 1st (== 0th) entry was chosen.
* Mon Oct 13 2008 bwalle@suse.de