From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
To: Simon Horman <horms@verge.net.au>, kexec@lists.infradead.org
Subject: [PATCH] ppc64/kdump: Fix ELF header endianess
Date: Fri, 25 Jul 2014 17:07:49 +0200 [thread overview]
Message-ID: <20140725150749.17944.26746.stgit@nimbus> (raw)
The ELF header created among the loading of the kdump kernel should be
flagged using the current endianess and not always as big endian.
Without this patch the data exposed in /proc/vmcore are not readable when
running in LE mode.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
kexec/arch/ppc64/crashdump-ppc64.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c
index 00a0e632f48e..6214b831fdf2 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.c
+++ b/kexec/arch/ppc64/crashdump-ppc64.c
@@ -38,7 +38,11 @@
static struct crash_elf_info elf_info64 =
{
class: ELFCLASS64,
+#if BYTE_ORDER == LITTLE_ENDIAN
+ data: ELFDATA2LSB,
+#else
data: ELFDATA2MSB,
+#endif
machine: EM_PPC64,
page_offset: PAGE_OFFSET,
lowmem_limit: MAXMEM,
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next reply other threads:[~2014-07-25 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 15:07 Laurent Dufour [this message]
2014-07-29 6:33 ` [PATCH] ppc64/kdump: Fix ELF header endianess Petr Tesarik
2014-08-28 13:03 ` Laurent Dufour
2014-09-01 0:58 ` Simon Horman
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=20140725150749.17944.26746.stgit@nimbus \
--to=ldufour@linux.vnet.ibm.com \
--cc=horms@verge.net.au \
--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