From: "Ken'ichi Ohmichi" <oomichi@mxs.nes.nec.co.jp>
To: kexec-ml <kexec@lists.infradead.org>
Subject: [PATCH] Fix the feature determining ELF32/ELF64 automatically
Date: Tue, 13 Nov 2007 19:34:36 +0900 [thread overview]
Message-ID: <47397DBC.8080308@mxs.nes.nec.co.jp> (raw)
[-- 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
next reply other threads:[~2007-11-13 10:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 10:34 Ken'ichi Ohmichi [this message]
2007-11-14 21:40 ` [PATCH] Fix the feature determining ELF32/ELF64 automatically Simon Horman
-- strict thread matches above, loose matches on Subject: below --
2007-11-13 10:29 Ken'ichi Ohmichi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47397DBC.8080308@mxs.nes.nec.co.jp \
--to=oomichi@mxs.nes.nec.co.jp \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox