From 60be563ec2bf6a86f01e42525a9092a46ab0a9099cdd7719a97c10a619d92de1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 30 Nov 2007 12:26:29 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kexec-tools?expand=0&rev=36 --- kexec-tools-elf32-elf64-fix | 37 +++++++++++++++++++++++++++++++++++++ kexec-tools.changes | 5 +++++ kexec-tools.spec | 7 ++++++- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 kexec-tools-elf32-elf64-fix diff --git a/kexec-tools-elf32-elf64-fix b/kexec-tools-elf32-elf64-fix new file mode 100644 index 0000000..4d94a91 --- /dev/null +++ b/kexec-tools-elf32-elf64-fix @@ -0,0 +1,37 @@ +From b41eacb1069eeefd630d807b1587247e6d89628c Mon Sep 17 00:00:00 2001 +From: Ken'ichi Ohmichi +Date: Tue, 13 Nov 2007 19:29:16 +0900 +Subject: [PATCH] Fix the feature determining ELF32/ELF64 automatically + +Hi, + +This patch fixes the problem that the kexec command cannot determine +ELF32/ELF64 automatically. + +On i386 system, the kexec command always determined an ELF32 /proc/vmcore +even if the memory is 4GB or larger, because of referring the outside +of the array "range[]". + + +Thanks +Ken'ichi Ohmichi + + +Signed-off-by: Ken'ichi Ohmichi +Signed-off-by: Simon Horman + +--- + kexec/arch/i386/crashdump-x86.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kexec/arch/i386/crashdump-x86.c ++++ b/kexec/arch/i386/crashdump-x86.c +@@ -528,7 +528,7 @@ static enum coretype get_core_type(struc + if (ranges == 0) + return CORE_TYPE_ELF64; + +- if (range[ranges].end > 0xFFFFFFFFUL) ++ if (range[ranges - 1].end > 0xFFFFFFFFUL) + return CORE_TYPE_ELF64; + else + return CORE_TYPE_ELF32; diff --git a/kexec-tools.changes b/kexec-tools.changes index 0f3ab79..f4bd502 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 30 10:52:03 CET 2007 - bwalle@suse.de + +- fix a problem with automatic determination of ELF32/ELF64 on i386 + ------------------------------------------------------------------- Tue Oct 30 08:46:49 CET 2007 - bwalle@suse.de diff --git a/kexec-tools.spec b/kexec-tools.spec index c3bf98b..71e26b3 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -22,13 +22,14 @@ Requires: %insserv_prereq %fillup_prereq AutoReqProv: on Summary: Tools for fast kernel loading Version: 1.101 -Release: 146 +Release: 153 Source: %{name}-%{package_version}.tar.bz2 Source1: README.SUSE Url: http://www.vergenet.net/linux/kexec/kexec-tools/ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: zlib-devel Patch1: kexec-longer-cmdline.diff +Patch2: kexec-tools-elf32-elf64-fix Patch20: kexec-tools.ppc64-32bit-build.patch Patch21: kexec-tools.ppc32-64bit-purgatory.patch Patch22: kexec-tools.gcc-bug.patch @@ -53,6 +54,7 @@ Authors: %prep %setup -q -n kexec-tools-%{package_version} %patch1 -p1 +%patch2 -p1 # %patch20 -p1 %patch21 -p1 @@ -90,7 +92,10 @@ install -c -m 0644 kexec/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8 %ifarch %ix86 x86_64 /%_lib/kexec-tools* %endif + %changelog +* Fri Nov 30 2007 - bwalle@suse.de +- fix a problem with automatic determination of ELF32/ELF64 on i386 * Tue Oct 30 2007 - bwalle@suse.de - update to kexec-tools-testing 20071030 o vmcoreinfo's address and size