All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linuxppc-dev@lists.ozlabs.org
Subject: [Bug 217702] New: makedumpfile can not open /proc/vmcore
Date: Tue, 25 Jul 2023 02:04:45 +0000	[thread overview]
Message-ID: <bug-217702-206035@https.bugzilla.kernel.org/> (raw)

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.

             reply	other threads:[~2023-07-25  2:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  2:04 bugzilla-daemon [this message]
2023-07-25  4:23 ` [Bug 217702] makedumpfile can not open /proc/vmcore bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-217702-206035@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.