diff --git a/kexec-tools-kdump-fix-elf-header-endianess.patch b/kexec-tools-kdump-fix-elf-header-endianess.patch new file mode 100644 index 0000000..c0c5bae --- /dev/null +++ b/kexec-tools-kdump-fix-elf-header-endianess.patch @@ -0,0 +1,31 @@ +From: Laurent Dufour +Subject: kdump fix ELF header endianess +References: bnc#888150 +Signed-off-by: Tony Jones +Upstream: pending + +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 +--- + kexec/arch/ppc64/crashdump-ppc64.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- 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, diff --git a/kexec-tools.changes b/kexec-tools.changes index b653c13..64064bc 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jul 26 14:53:22 UTC 2014 - tonyj@suse.com + +- Fix ELF header endianess for ppc64le kdump (bnc#888150) + New patch: kexec-tools-kdump-fix-elf-header-endianess.patch + ------------------------------------------------------------------- Sun Jul 20 19:49:17 UTC 2014 - p.drouand@gmail.com diff --git a/kexec-tools.spec b/kexec-tools.spec index 8b798d6..9780eab 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -44,6 +44,8 @@ Patch8: %{name}-ppc64-purgatory-disabling-gcc-stack-protection.patch Patch9: %{name}-zero-efi-info.patch Patch10: %{name}-fs2dt-fix-endianess-issue-with-initrd-base-and-size.patch Patch11: %{name}-ppc64-purgatory-device-tree-values-should-be-read-stored-in-big-endian.patch +Patch12: %{name}-kdump-fix-elf-header-endianess.patch + Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build #!BuildIgnore: fop @@ -75,6 +77,7 @@ the loaded kernel after it panics. %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build # disable as-needed