linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Amr Bekhit <amr@helmpcb.com>
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: kexec on arm fails, possibly due to memdup_user
Date: Sun, 2 Jul 2023 16:51:57 +0100	[thread overview]
Message-ID: <ZKGdHeDQx1sornim@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAHmAUHLacAWmFSx9iyNMvbSa64QU3o9C3+m202hxTdyVSDdDnw@mail.gmail.com>

On Sat, Jul 01, 2023 at 08:25:46PM +0100, Amr Bekhit wrote:
> I'm trying to get kexec working on my Qualcom IPQ4019-based ARM
> system. My system is built using yocto mickledore, but I'm using the
> kernel from openwrt, so that's 5.15.110 (config:
> https://pastebin.com/KgP2sJLf). I've compiled in kexec support in the
> kernel and included the kexec tools. I'm then trying to load and
> execute a zImage, but the load fails. I've added some debug messages
> to the kexec_load function in the kernel to try and figure out where
> it's failing (see https://pastebin.com/G6AEKakw). Here is the output
> of the kexec commands, with the kernel debug messages interdispersed:

It could be:

        /*
         * Validate that if the current HW supports SMP, then the SW supports
         * and implements CPU hotplug for the current HW. If not, we won't be
         * able to kexec reliably, so fail the prepare operation.
         */
        if (num_possible_cpus() > 1 && platform_can_secondary_boot() &&
            !platform_can_cpu_hotplug())
                return -EINVAL;

or:

                if (!memblock_is_region_memory(idmap_to_phys(current_segment->mem),
                                               current_segment->memsz))
                        return -EINVAL;

in machine_kexec_prepare().

If it's the former, then it means your platform has more tha one CPU,
but has no way to take the secondary CPUs offline.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-07-02 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-01 19:25 kexec on arm fails, possibly due to memdup_user Amr Bekhit
2023-07-02 15:51 ` Russell King (Oracle) [this message]
2023-07-04 17:48   ` Amr Bekhit
2023-07-04 20:53     ` Russell King (Oracle)
2023-07-06 16:47       ` Amr Bekhit

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=ZKGdHeDQx1sornim@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=amr@helmpcb.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).