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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C1E8C433B4 for ; Tue, 18 May 2021 14:25:27 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8910860E09 for ; Tue, 18 May 2021 14:25:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8910860E09 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Mj24SB4dhaq/Egox9TkvxXjm2wfP44NUP314NOuKF1g=; b=pWwc3xpz6G/iAeI0Zd0YgUJ1W 6J7xkU6MK97sTcKuOBWIJVYJ1+y/j5J9/A2rN3V+g3snyZ2DbsuE3IhFvj/0l24BEFEKosnlTNgsG oSrK3Rkli0CHgTuikU+cxv2Ijphkbdi+t0D0IXbCA0jPILDSRHY8SUwDw2eb0LHJ3UJB0BX7VpLzD vNfhEuyACSHBkmyskxI1WYPJc2nZwAhPHZBdU7TYuBniCGyCBKm6rH/lJT/u8cpbrjUvuO3cb4L50 Babs923ypU1RyJtmhaj66tEFWbfcgVXGY/e7oVgWU/LlRE6jfQVKWqkz6TGIC3Nu0qoTerpsUm9FZ tpNN21dfw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj0dA-001127-OK; Tue, 18 May 2021 14:23:33 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0d2-00110h-4S for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 14:23:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZbABP2q/eXEJIvkqnGpFxkAfgS/b8Y3XeaABk+Hllac=; b=mX95WjWYFOLo6ulRD7PQSnE4wK nNahpHXBR+jmIp8jLeBqboOvx+H0IVPsyXjP68KrqgJuFGyhW3kNDOg172a7MPQPZ1Knkbod6gC5H hY4pCdjZdpR56zQ67HVEV9SO4PKdr0usj4mQOiIUZcYCcabBr1DdSNTrD7Taud5m67/RDSwzUL1RC ZsWSBpEm3OoigjExCoz6D1uvUkox9JX6ee+bkYEo/vE46WWhtEIpT0bhn+FUDrNZVhmLyC32OI7B+ bf3ccXLJeg5RWg56rVlePyJUlF7udoxLPcE7UkvwbySPj7IHHDIm/VKlslgo/4UT6cxxvb+ugUxnQ MwLpb8HQ==; Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj0cz-00Ej2X-8s for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 14:23:22 +0000 Received: by mail-ot1-x32a.google.com with SMTP id t10-20020a05683022eab0290304ed8bc759so8745062otc.12 for ; Tue, 18 May 2021 07:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZbABP2q/eXEJIvkqnGpFxkAfgS/b8Y3XeaABk+Hllac=; b=f8DUwmckcbz6xTwO6McjALnF6n2zcKwC8bZR04dx5uXy867MEadt+NYgzvx3P3HytH lveu3XvNrsZunyb/rcxhwLIJ+b4APz4mdd+W8Q9e06DIXHW/XNMjnluilblNu40pMMTK qtGugYyQonQKp0W1BDcpysOb2vPCksWNAgzkDyoJu7Xavu2Ax0p7FubtO9KXweygKgx9 hOi/aivgV/6ysLPiHsvf+OKHInLMIgqxuWk06Py4UJee7h+ur23rR2NckoF/LL7SYen6 UpY4PCCbYImaj+LcBcM5JnqK20YFe8z15CTPtgoS7KpbatEivhVCHIxNhOzY6OPH+V6A ePNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZbABP2q/eXEJIvkqnGpFxkAfgS/b8Y3XeaABk+Hllac=; b=n3Vj5TOzeM7/LJoN5TZ5MXvTLP8dxp8i/QnqI5seuxfvjli5KwQ2zkuU09hN6UMarQ MADnBhloaPKgq0AO9DXY5Gy9Rih3h1B/qyb9hdECGH9RywXY3OAcVoPIeIsVmSY0ivbY j98wMY121o/wMn8wcGX8KBqqOFh4AaLdoTS95cen6J8dVpjozrbvsFz29DLK0IhI/a1c Gs5RTTsSIZa81gvyXJEJ3JmuvgzeszACGDS82Q3aJhMslgiIta4RXPRHMTOqXpdCfq4C pDc8HpTlKL0OAMAkKchtgSYBvrSY5Lzi2IO4qLv7pE0groOe8fgIjmcMoZL8o9sgcAGB /spw== X-Gm-Message-State: AOAM530iZnyv6J+I3CWO2EjvwIKkSApVzN+m3OhJ2gOPpvCWcDlMMTR1 Hvgvv4HacAt2Zg5OlhrlHGTNY/rUnB9vef108HbUrg== X-Google-Smtp-Source: ABdhPJxHNxw71x8pI5oH9kDwhSshLos11ga2UWan+nMgkODk7CIRx8rJJ6nhaMtXmChFPSjwsyWBcyQ3GrHC724DB2E= X-Received: by 2002:a9d:6117:: with SMTP id i23mr4441362otj.28.1621347799465; Tue, 18 May 2021 07:23:19 -0700 (PDT) MIME-Version: 1.0 References: <20210429133533.1750721-1-maz@kernel.org> <20210518114857.GA7914@willie-the-truck> In-Reply-To: <20210518114857.GA7914@willie-the-truck> From: Bhupesh Sharma Date: Tue, 18 May 2021 19:53:08 +0530 Message-ID: Subject: Re: [PATCH 0/2] arm64: kexec_file_load vs memory reservations To: Will Deacon Cc: Marc Zyngier , kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Ard Biesheuvel , Mark Rutland , James Morse , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Eric Biederman , AKASHI Takahiro , kernel-team@android.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_072321_357876_6427845B X-CRM114-Status: GOOD ( 24.08 ) 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 Hi Will, On Tue, 18 May 2021 at 17:19, Will Deacon wrote: > > [Fixing Bhupesh's email address] > > On Thu, Apr 29, 2021 at 02:35:31PM +0100, Marc Zyngier wrote: > > It recently became apparent that using kexec with kexec_file_load() on > > arm64 is pretty similar to playing Russian roulette. > > > > Depending on the amount of memory, the HW supported and the firmware > > interface used, your secondary kernel may overwrite critical memory > > regions without which the secondary kernel cannot boot (the GICv3 LPI > > tables being a prime example of such reserved regions). > > > > It turns out that there is at least two ways for reserved memory > > regions to be described to kexec: /proc/iomem for the userspace > > implementation, and memblock.reserved for kexec_file. And of course, > > our LPI tables are only reserved using the resource tree, leading to > > the aforementioned stamping. Similar things could happen with ACPI > > tables as well. > > > > On my 24xA53 system artificially limited to 256MB of RAM (yes, it > > boots with that little memory), trying to kexec a secondary kernel > > failed every times. I can only presume that this was mostly tested > > using kdump, which preserves the entire kernel memory range. > > > > This small series aims at triggering a discussion on what are the > > expectations for kexec_file, and whether we should unify the two > > reservation mechanisms. > > Bhupesh, since you've been involved with kexec file on arm64 before, please > could you take a look at these patches? Thanks for adding me in Cc. Yes, I will look and test these patches asap. Regards, Bhupesh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel