[Bug 217702] New: makedumpfile can not open /proc/vmcore

bugzilla-daemon at kernel.org bugzilla-daemon at kernel.org
Tue Jul 25 12:04:45 AEST 2023


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 at kernel-bugs.osdl.org
          Reporter: piliu at redhat.com
        Regression: No

This bug should be introduced by the
commit 606787fed7268feb256957872586370b56af697a
Author: Nicholas Piggin <npiggin at 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 at gmail.com>
    Signed-off-by: Michael Ellerman <mpe at 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.


More information about the Linuxppc-dev mailing list