kexec-tools/kexec-tools-elf32-elf64-fix

38 lines
1.0 KiB
Plaintext

From b41eacb1069eeefd630d807b1587247e6d89628c Mon Sep 17 00:00:00 2001
From: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
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 <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
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;