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=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 1AFF8C47082 for ; Mon, 31 May 2021 19:38:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D7FCE610A6 for ; Mon, 31 May 2021 19:38:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7FCE610A6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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=bombadil.20210309; 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=WyFobEDrn3Dv5QzfdB2KhZLyKyn3FH+rNGI1EsWaWPg=; b=hX6im82Fqn6cGk L41n5CozBUHMxdXoEKQim+C3fy0CJwjUxOlS+jztyRaznAv3QSuex5kgTxIKPLlefEmfue4PXe+4F Msbm/cEG9Rm66zpKwVSqVutgjqTYZYyJOGUFj0qhwI1rEFD/MaZM/4UxcuEaRjbaTzmeBr25J1qjn ANXe0iIQC40LmyJb0PIvSSxKKGr2l6hiAWQVbhA2xdZ/nqtWca/FxgaqtTw2btbEt0zcTP2wp3/lE d8Ha3EHFjnZ/xgoOs2nwmOUmh1iJkEojQ12FaMMi5olqj0BECaigUmoTZT9JJwWRGk621TojIye6F /DwDDzlPKl6qUz2eGGjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnniV-00DFHJ-1o; Mon, 31 May 2021 19:36:51 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnniQ-00DFGh-7Y; Mon, 31 May 2021 19:36:47 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9802561364; Mon, 31 May 2021 19:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622489805; bh=CLLhfPrGUsh9JYNXiGJiXeJ+RJ6r+AscuPI1NBWlG5w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=c2Dqg7GWLB84YPc3RL/DZS2dSv7b9DnrLUt+9fQ39YNaqog0T1BRyqHF0g99W/kG4 kVZ2XwUlRKsEIdx3mu2+3VBOJV8ERpcYo0mrC94IQiLva95SgBBp9B84zfRJj27GRv ojWggEuAFssJPXf7SX/WGfLbqLvN+5taWwME07vHN8rPO8Cs3vmIkLsgtQB4uSv2K4 x+kuBVsQKYxzTRqw/QD3+CLa6W8Hl6YbVPU+Q9yQ2t1t0zYWvA70gFdNyUICubMVIe WNt2Z5qkqMTkFH7sgRjoLPbnxgJntQjII1S+M7qpFXc36/23B8X7VdTqJPBE96ezo4 MHbcM+yzWdVSw== Received: by mail-ot1-f45.google.com with SMTP id t10-20020a05683022eab0290304ed8bc759so11964342otc.12; Mon, 31 May 2021 12:36:45 -0700 (PDT) X-Gm-Message-State: AOAM531uw1DkFl5FhWRQvmgkCgyn1SySL/nl4rdSQKSO3nUZkxADXLQt +V3EgZdh+raqtMYo9VS9ZsZnu3xfEXEB2U0UySo= X-Google-Smtp-Source: ABdhPJzKQ18se19IrtZo2HMHS0JyPFh2MzBsqtIx1KLprlO2Vao7wxsnqsNC4IogO3uIkDgHCuM8VB9hhwigwiULMks= X-Received: by 2002:a9d:7cd8:: with SMTP id r24mr18604847otn.90.1622489804839; Mon, 31 May 2021 12:36:44 -0700 (PDT) MIME-Version: 1.0 References: <20210531095720.77469-1-maz@kernel.org> In-Reply-To: <20210531095720.77469-1-maz@kernel.org> From: Ard Biesheuvel Date: Mon, 31 May 2021 21:36:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] arm64: Make kexec_file_load honor iomem reservations To: Marc Zyngier Cc: kexec@lists.infradead.org, Linux ARM , Linux Kernel Mailing List , Catalin Marinas , Will Deacon , Mark Rutland , James Morse , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Eric Biederman , Bhupesh SHARMA , AKASHI Takahiro , Dave Young , Andrew Morton , Moritz Fischer , Android Kernel Team X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210531_123646_337842_84A420BA X-CRM114-Status: GOOD ( 24.90 ) 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 Mon, 31 May 2021 at 11:57, Marc Zyngier wrote: > > This series is a complete departure from the approach I initially sent > almost a month ago[0]. Instead of trying to teach EFI, ACPI and other > subsystem to use memblock, I've decided to stick with the iomem > resource tree and use that exclusively for arm64. > > This means that my current approach is (despite what I initially > replied to both Dave and Catalin) to provide an arm64-specific > implementation of arch_kexec_locate_mem_hole() which walks the > resource tree and excludes ranges of RAM that have been registered for > any odd purpose. This is exactly what the userspace implementation > does, and I don't really see a good reason to diverge from it. > > Again, this allows my Synquacer board to reliably use kexec_file_load > with as little as 256M, something that would always fail before as it > would overwrite most of the reserved tables. > > Although this series still targets 5.14, the initial patch is a > -stable candidate, and disables non-kdump uses of kexec_file_load. I > have limited it to 5.10, as earlier kernels will require a different, > probably more invasive approach. > > Catalin, Ard: although this series has changed a bit compared to v1, > I've kept your AB/RB tags. Should anything seem odd, please let me > know and I'll drop them. > Fine with me. > Thanks, > > M. > > * From v1 [1]: > - Move the overlap exclusion into find_next_iomem_res() > - Handle child resource not overlapping with parent > - Provide walk_system_ram_excluding_child_res() as a top level > walker > - Simplify arch-specific code > - Add initial patch disabling non-crash kernels > > [0] https://lore.kernel.org/r/20210429133533.1750721-1-maz@kernel.org > [1] https://lore.kernel.org/r/20210526190531.62751-1-maz@kernel.org > > Marc Zyngier (5): > arm64: kexec_file: Forbid non-crash kernels > kexec_file: Make locate_mem_hole_callback global > kernel/resource: Allow find_next_iomem_res() to exclude overlapping > child resources > kernel/resource: Introduce walk_system_ram_excluding_child_res() > arm64: kexec_image: Restore full kexec functionnality > > arch/arm64/kernel/kexec_image.c | 39 ++++++++++++++++ > include/linux/ioport.h | 3 ++ > include/linux/kexec.h | 1 + > kernel/kexec_file.c | 6 +-- > kernel/resource.c | 82 +++++++++++++++++++++++++++++---- > 5 files changed, 119 insertions(+), 12 deletions(-) > > -- > 2.30.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel