From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09232EB64DA for ; Sun, 2 Jul 2023 15:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GfOsz9UyFdCQVOPfXB3iosnCOoUK9njvav9BLWFyNMw=; b=qRpw+DdTxwAUii ap5TzTSGkIWJB3266a0o6gIYwxOBFEcYg1Y7A1FZVrLW1OqwdS1yGQb9r5vcmLeTiBTqyGcy9b1/I XWoNO7n0HRqMKmYdFEG5EVoTJpVa/dN6fzP8btEXknPyDWSk5QfLYIkOf0/u0Y7j7VR2154tD2oE2 dZzd3CEKTczpJ7b4jAxswRhcHo8mhiwKAejflS/VD7ZXTm9SkQ2tSPv+wSThx0UjVPrUTejb3aNIT D9ITfo+AkcrfWWd6isKthWtbkZg2nH/ljEPBL/ghvqsgeWBkmma/qUXL0ktQZgS6rq5L+rJ9MOrou 2iRqxBIZO2DXouzXwFZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qFzOq-0084jC-0o; Sun, 02 Jul 2023 15:54:08 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qFzOm-0084XZ-1k for linux-arm-kernel@lists.infradead.org; Sun, 02 Jul 2023 15:54:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=psa/iqUSYL0UgVQ9MiLpy899uP9FLnIalI6EdgKYtbs=; b=BVcFy1Di9k1CVGG+zOB0oCmfXF oI1UZ7BCuuaK2Ewg3V6pq9VUehlGEB++9bFVaTFGl1tW2WIU5PzrszJFnvaQ7C7llybLETyVj/du7 0YswGEO6JwsQGvyoiVLT21YSf2jI8kjjrSSXDbrHVAMxeITIih0oVn+ll/b4g5E7hFosZ6leMRSlI Kd5uwG0EPyhjaOyw3tPWmDBNbtW8cZJYNIGU2B4kNDF+wP7cKWRZj85S4rdAqMaBF690SpIktgKK3 BWvHBNxG8nxvuAL8e/EpW6MRfvwlwVjeIJuZlVCmAXhTNiBXOIrungwI5hVFSI5/hobjKEgTyZEBs w/2JR6cg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46236) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qFzMj-0000xo-2S; Sun, 02 Jul 2023 16:51:57 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qFzMj-0002g2-43; Sun, 02 Jul 2023 16:51:57 +0100 Date: Sun, 2 Jul 2023 16:51:57 +0100 From: "Russell King (Oracle)" To: Amr Bekhit Cc: linux-arm-kernel@lists.infradead.org Subject: Re: kexec on arm fails, possibly due to memdup_user Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230702_085405_476739_B9972F4D X-CRM114-Status: GOOD ( 17.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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