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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 6E90BC47089 for ; Thu, 27 May 2021 17:37:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A2A0613BE for ; Thu, 27 May 2021 17:37:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234554AbhE0RjR (ORCPT ); Thu, 27 May 2021 13:39:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:60926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229878AbhE0RjP (ORCPT ); Thu, 27 May 2021 13:39:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A9638610A5; Thu, 27 May 2021 17:37:39 +0000 (UTC) Date: Thu, 27 May 2021 18:37:37 +0100 From: Catalin Marinas To: Marc Zyngier Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon , Ard Biesheuvel , Mark Rutland , James Morse , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Eric Biederman , Bhupesh SHARMA , AKASHI Takahiro , Dave Young , Moritz Fischer , kernel-team@android.com Subject: Re: [PATCH 4/4] arm64: kexec_image: Implement arch_kexec_locate_mem_hole() Message-ID: <20210527173736.GG8661@arm.com> References: <20210526190531.62751-1-maz@kernel.org> <20210526190531.62751-5-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210526190531.62751-5-maz@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 26, 2021 at 08:05:31PM +0100, Marc Zyngier wrote: > Provide an arm64-specific implementation for arch_kexec_locate_mem_hole(), > using the resource tree instead of memblock, and respecting > the reservations added by EFI. > > This ensures that kexec_file is finally reliable. > > Reported-by: Moritz Fischer > Signed-off-by: Marc Zyngier It would have been clearer if __walk_iomem_res_desc() was able to do such child res excluding callback (if asked via a new flag/arg) directly but it's too late in the day to figure out if it's possible. It would save us from another callback in the arch code. But if it's not possible or you want to stick to this approach, fine by me: Reviewed-by: Catalin Marinas -- Catalin 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=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 4A051C47089 for ; Thu, 27 May 2021 18:55:07 +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 0D3AE613D4 for ; Thu, 27 May 2021 18:55:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D3AE613D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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: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=PvbcVnHhhv27SOYjxaTfqeNGpYh1DmHhBSGhyFKWOG0=; b=Qm8sq6jj7Odwmg f1v/GmuIS14BgMGOcKYtW+Nswib21QJS7d94VgyyqA3CwyHI6S1aXxuAttt0bXZj5WcdjZTCeCTke t6Qyzw7ApNaUGLzZfSwC9Vays2EEsqM5/HjBzzYuG3W1Pj8KyEVLw7Hj+2FM1bOngsiJJ7x+sylhL w2FQd5LdHudTR45uTNSMcfJOfHukEIDtXtBWmhnnUQZVrpJy04fOk1HKYQRA+GdpZ+EdKqDCt3odf YQSeDdHsmGRmeKKY1CElEQpo8k9egEdvDAdKI/f5ncXpFz/BzN3HO15GkMOrpDXBkxTIIV/z7ES9i /jYuSRr8n5BE4eULrcZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmL6r-008gtK-EH; Thu, 27 May 2021 18:51:57 +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 1lmJx0-0089Zt-WE; Thu, 27 May 2021 17:37:44 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id A9638610A5; Thu, 27 May 2021 17:37:39 +0000 (UTC) Date: Thu, 27 May 2021 18:37:37 +0100 From: Catalin Marinas To: Marc Zyngier Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon , Ard Biesheuvel , Mark Rutland , James Morse , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Eric Biederman , Bhupesh SHARMA , AKASHI Takahiro , Dave Young , Moritz Fischer , kernel-team@android.com Subject: Re: [PATCH 4/4] arm64: kexec_image: Implement arch_kexec_locate_mem_hole() Message-ID: <20210527173736.GG8661@arm.com> References: <20210526190531.62751-1-maz@kernel.org> <20210526190531.62751-5-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210526190531.62751-5-maz@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_103743_088138_981081EB X-CRM114-Status: GOOD ( 11.04 ) 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 Wed, May 26, 2021 at 08:05:31PM +0100, Marc Zyngier wrote: > Provide an arm64-specific implementation for arch_kexec_locate_mem_hole(), > using the resource tree instead of memblock, and respecting > the reservations added by EFI. > > This ensures that kexec_file is finally reliable. > > Reported-by: Moritz Fischer > Signed-off-by: Marc Zyngier It would have been clearer if __walk_iomem_res_desc() was able to do such child res excluding callback (if asked via a new flag/arg) directly but it's too late in the day to figure out if it's possible. It would save us from another callback in the arch code. But if it's not possible or you want to stick to this approach, fine by me: Reviewed-by: Catalin Marinas -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Thu, 27 May 2021 18:37:37 +0100 From: Catalin Marinas Subject: Re: [PATCH 4/4] arm64: kexec_image: Implement arch_kexec_locate_mem_hole() Message-ID: <20210527173736.GG8661@arm.com> References: <20210526190531.62751-1-maz@kernel.org> <20210526190531.62751-5-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210526190531.62751-5-maz@kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Marc Zyngier Cc: kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon , Ard Biesheuvel , Mark Rutland , James Morse , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Eric Biederman , Bhupesh SHARMA , AKASHI Takahiro , Dave Young , Moritz Fischer , kernel-team@android.com On Wed, May 26, 2021 at 08:05:31PM +0100, Marc Zyngier wrote: > Provide an arm64-specific implementation for arch_kexec_locate_mem_hole(), > using the resource tree instead of memblock, and respecting > the reservations added by EFI. > > This ensures that kexec_file is finally reliable. > > Reported-by: Moritz Fischer > Signed-off-by: Marc Zyngier It would have been clearer if __walk_iomem_res_desc() was able to do such child res excluding callback (if asked via a new flag/arg) directly but it's too late in the day to figure out if it's possible. It would save us from another callback in the arch code. But if it's not possible or you want to stick to this approach, fine by me: Reviewed-by: Catalin Marinas -- Catalin _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec