* [Bug 217702] New: makedumpfile can not open /proc/vmcore
@ 2023-07-25 2:04 bugzilla-daemon
2023-07-25 4:23 ` [Bug 217702] " bugzilla-daemon
0 siblings, 1 reply; 2+ messages in thread
From: bugzilla-daemon @ 2023-07-25 2:04 UTC (permalink / raw)
To: linuxppc-dev
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: platform_ppc-64@kernel-bugs.osdl.org
Reporter: piliu@redhat.com
Regression: No
This bug should be introduced by the
commit 606787fed7268feb256957872586370b56af697a
Author: Nicholas Piggin <npiggin@gmail.com>
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.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230606093832.199712-5-npiggin@gmail.com
And can be workaround by the following draft patch:
diff --git a/arch/powerpc/kexec/file_load_64.c
b/arch/powerpc/kexec/file_load_64.c
index 110d28bede2a..6af49c90c4b2 100644
--- a/arch/powerpc/kexec/file_load_64.c
+++ b/arch/powerpc/kexec/file_load_64.c
@@ -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;
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Bug 217702] makedumpfile can not open /proc/vmcore
2023-07-25 2:04 [Bug 217702] New: makedumpfile can not open /proc/vmcore bugzilla-daemon
@ 2023-07-25 4:23 ` bugzilla-daemon
0 siblings, 0 replies; 2+ messages in thread
From: bugzilla-daemon @ 2023-07-25 4:23 UTC (permalink / raw)
To: linuxppc-dev
https://bugzilla.kernel.org/show_bug.cgi?id=217702
Michael Ellerman (michael@ellerman.id.au) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |michael@ellerman.id.au
Resolution|--- |CODE_FIX
--- Comment #1 from Michael Ellerman (michael@ellerman.id.au) ---
This should be fixed in mainline due to the revert:
106ea7ffd56b ("Revert "powerpc/64s: Remove support for ELFv1 little endian
userspace"")
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-25 4:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 2:04 [Bug 217702] New: makedumpfile can not open /proc/vmcore bugzilla-daemon
2023-07-25 4:23 ` [Bug 217702] " bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).