New: makedumpfile can not open /proc/vmcore
https://bugzilla.kernel.org/show_bug.cgi?id=217702
Bug ID: 217702
Summary: makedumpfile can not open /proc/vmcore
Product: Platform Specific/Hardware
Version: 2.5
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: PPC-64
Assignee: [email protected]
Reporter: [email protected]
Regression: No
This bug should be introduced by the
commit 606787fed7268feb256957872586370b56af697a
Author: Nicholas Piggin <[email protected]> Date: Tue Jun 6 19:38:32 2023 +1000
powerpc/64s: Remove support for ELFv1 little endian userspace
ELFv2 was introduced together with little-endian. ELFv1 with LE has never been a thing. The GNU toolchain can create such a beast, but anyone doing that is a maniac who needs to be stopped so I consider this patch a feature.
And can be workaround by the following draft patch:
(quoted diff) +0 -0
b/arch/powerpc/kexec/file_load_64.c
index 110d28bede2a..6af49c90c4b2 100644
arch/powerpc/kexec/file_load_64.c +0 -0
@@ -782,6 +782,18 @@ static void update_backup_region_phdr(struct kimage
*image, Elf64_Ehdr *ehdr)
}
}
+/**
+ * 64le only supports ELFv2 64-bit binaries (64be supports v1 and v2).
+ */
+static inline void update_elfcorehdr_eflags(Elf64_Ehdr *ehdr) +{
+#if defined(CONFIG_PPC64) && defined(CONFIG_CPU_LITTLE_ENDIAN)
+ ehdr->e_flags = 0x2;
+#endif
+}
+
+
+
/**
* load_elfcorehdr_segment - Setup crash memory ranges and initialize
elfcorehdr
* segment needed to load kdump kernel.
@@ -810,6 +822,7 @@ static int load_elfcorehdr_segment(struct kimage *image, struct kexec_buf *kbuf)
/* Fix the offset for backup region in the ELF header */
update_backup_region_phdr(image, headers);+ update_elfcorehdr_eflags(headers);
kbuf->buffer = headers;
kbuf->mem = KEXEC_BUF_MEM_UNKNOWN;Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 217702] makedumpfile can not open /proc/vmcore
https://bugzilla.kernel.org/show_bug.cgi?id=217702
Michael Ellerman ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |[email protected]
Resolution|--- |CODE_FIX--- Comment #1 from Michael Ellerman ([email protected]) --- This should be fixed in mainline due to the revert:
106ea7ffd56b ("Revert "powerpc/64s: Remove support for ELFv1 little endian userspace"")
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.