Skip to contentSkip to conversation

Fix the feature determining ELF32/ELF64 automatically

PATCH Applied Ken'ichi Ohmichi 2 participants 2 messages Nov 13, 2007 – Nov 14, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---

kexec/arch/i386/crashdump-x86.c +1 -1
diff -rpuN a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
@@ -496,7 +496,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;

_

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Applied
#1 lore raw
Quoted 9 lines · Ken'ichi Ohmichi

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, applied.

Signature · 1 line
宝曼 西門 (ホウマン・サイモン) | Simon Horman (Horms)

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec