* [PATCH] ppc64/kdump: Fix ELF header endianess
@ 2014-07-25 15:07 Laurent Dufour
2014-07-29 6:33 ` Petr Tesarik
2014-08-28 13:03 ` Laurent Dufour
0 siblings, 2 replies; 4+ messages in thread
From: Laurent Dufour @ 2014-07-25 15:07 UTC (permalink / raw)
To: Simon Horman, kexec
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ppc64/kdump: Fix ELF header endianess
2014-07-25 15:07 [PATCH] ppc64/kdump: Fix ELF header endianess Laurent Dufour
@ 2014-07-29 6:33 ` Petr Tesarik
2014-08-28 13:03 ` Laurent Dufour
1 sibling, 0 replies; 4+ messages in thread
From: Petr Tesarik @ 2014-07-29 6:33 UTC (permalink / raw)
To: Laurent Dufour; +Cc: Simon Horman, kexec
On Fri, 25 Jul 2014 17:07:49 +0200
Laurent Dufour <ldufour@linux.vnet.ibm.com> wrote:
> 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.
FWIW I can confirm that this patch has fixed kdump on my ppc64le system.
Thank you, Laurent!
Petr Tesarik
> 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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ppc64/kdump: Fix ELF header endianess
2014-07-25 15:07 [PATCH] ppc64/kdump: Fix ELF header endianess Laurent Dufour
2014-07-29 6:33 ` Petr Tesarik
@ 2014-08-28 13:03 ` Laurent Dufour
2014-09-01 0:58 ` Simon Horman
1 sibling, 1 reply; 4+ messages in thread
From: Laurent Dufour @ 2014-08-28 13:03 UTC (permalink / raw)
To: Simon Horman, kexec
On 25/07/2014 17:07, Laurent Dufour wrote:
> 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.
Hi Simon,
Do you have any concerns with this patch ?
If not, would you please consider it for merge since it fixes a major
issue with dump analysis.
Thanks
Laurent.
> 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
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ppc64/kdump: Fix ELF header endianess
2014-08-28 13:03 ` Laurent Dufour
@ 2014-09-01 0:58 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2014-09-01 0:58 UTC (permalink / raw)
To: Laurent Dufour; +Cc: kexec
On Thu, Aug 28, 2014 at 03:03:11PM +0200, Laurent Dufour wrote:
> On 25/07/2014 17:07, Laurent Dufour wrote:
> > 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.
>
> Hi Simon,
>
> Do you have any concerns with this patch ?
> If not, would you please consider it for merge since it fixes a major
> issue with dump analysis.
Thanks, I have applied this patch.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-01 0:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-25 15:07 [PATCH] ppc64/kdump: Fix ELF header endianess Laurent Dufour
2014-07-29 6:33 ` Petr Tesarik
2014-08-28 13:03 ` Laurent Dufour
2014-09-01 0:58 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox