Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix the feature determining ELF32/ELF64 automatically
@ 2007-11-13 10:29 Ken'ichi Ohmichi
  0 siblings, 0 replies; 3+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-13 10:29 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 855 bytes --]


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>
---
diff -rpuN a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
--- a/kexec/arch/i386/crashdump-x86.c	2007-11-13 18:06:05.000000000 +0900
+++ b/kexec/arch/i386/crashdump-x86.c	2007-11-13 18:13:09.000000000 +0900
@@ -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;
_



[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Fix the feature determining ELF32/ELF64 automatically
@ 2007-11-13 10:34 Ken'ichi Ohmichi
  2007-11-14 21:40 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Ken'ichi Ohmichi @ 2007-11-13 10:34 UTC (permalink / raw)
  To: kexec-ml

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]


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>
---
diff -rpuN a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
--- a/kexec/arch/i386/crashdump-x86.c	2007-11-13 18:06:05.000000000 +0900
+++ b/kexec/arch/i386/crashdump-x86.c	2007-11-13 18:13:09.000000000 +0900
@@ -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;
_




[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix the feature determining ELF32/ELF64 automatically
  2007-11-13 10:34 [PATCH] Fix the feature determining ELF32/ELF64 automatically Ken'ichi Ohmichi
@ 2007-11-14 21:40 ` Simon Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2007-11-14 21:40 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: kexec-ml

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

On Tue, Nov 13, 2007 at 07:34:36PM +0900, Ken'ichi Ohmichi wrote:
> 
> 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.

-- 
宝曼 西門 (ホウマン・サイモン) | Simon Horman (Horms)


[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-14 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-13 10:34 [PATCH] Fix the feature determining ELF32/ELF64 automatically Ken'ichi Ohmichi
2007-11-14 21:40 ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2007-11-13 10:29 Ken'ichi Ohmichi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox