[PATCH] ppc64/kdump: Fix ELF header endianess
Laurent Dufour
ldufour at linux.vnet.ibm.com
Thu Aug 28 06:03:11 PDT 2014
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 at 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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>
More information about the kexec
mailing list