From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Fri, 28 May 2021 10:05:47 +0100 Message-ID: <87zgwf1b4k.wl-maz@kernel.org> From: Marc Zyngier Subject: Re: [PATCH 4/4] arm64: kexec_image: Implement arch_kexec_locate_mem_hole() In-Reply-To: <20210527173736.GG8661@arm.com> References: <20210526190531.62751-1-maz@kernel.org> <20210526190531.62751-5-maz@kernel.org> <20210527173736.GG8661@arm.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") 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: Catalin Marinas 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 Thu, 27 May 2021 18:37:37 +0100, Catalin Marinas wrote: > > 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. Yeah, that should be possible with some minor refactoring of the generic and x86 code, allowing us to get rid of the double arch callback circus. It would also make the locking a bit saner, but also change it for all the callers... I'll have a play with it. > But if it's not possible or you want to stick to this approach, fine > by me: > > Reviewed-by: Catalin Marinas Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec 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_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 F0BE3C4708D for ; Fri, 28 May 2021 09:07:20 +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 BB4AB6109F for ; Fri, 28 May 2021 09:07:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB4AB6109F 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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aAzZej/CYZgzclXleYi/DqxozFpGB/hPuf3NmTfHrWk=; b=R6NdxwBQ7LV2uI D1cldBxnaM+C1GbVkdNg+uqlyruaN03HHClhYycJh/gXvSJ3uOnkdbshY4U1HUvz4pptlEp4+FKsQ +dQMEbTHkhgIgah1U6p9YijFDVrVfjZn6pjFCNs60lsxOg7NrZ/y/nZBiCo7RAKpRRZlplxubVDaB +9GaW/6WAy0qR2cC7NmOtg8TiZtvmIS0Y7iwoJda+ByChfxDyTluvMrT7XsjLa/5tct7rM7x1ReiY 3UPFBHu54xFOwfND62hUYPqMptxeM2nI072t7NdrLsGlo4JEiD43p2+MyNo7cGF92m/zFEsM6QHK3 9eU4N8FC3wgSwGkx0GzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmYRO-00DgMy-5J; Fri, 28 May 2021 09:06:02 +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 1lmYRD-00DgIF-Qc; Fri, 28 May 2021 09:05:57 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E85F6127A; Fri, 28 May 2021 09:05:51 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lmYRB-0046mf-4c; Fri, 28 May 2021 10:05:49 +0100 Date: Fri, 28 May 2021 10:05:47 +0100 Message-ID: <87zgwf1b4k.wl-maz@kernel.org> From: Marc Zyngier To: Catalin Marinas 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() In-Reply-To: <20210527173736.GG8661@arm.com> References: <20210526190531.62751-1-maz@kernel.org> <20210526190531.62751-5-maz@kernel.org> <20210527173736.GG8661@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: catalin.marinas@arm.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, ardb@kernel.org, mark.rutland@arm.com, james.morse@arm.com, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, ebiederm@xmission.com, bhupesh.sharma@linaro.org, takahiro.akashi@linaro.org, dyoung@redhat.com, mdf@kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210528_020551_907717_E0368AD0 X-CRM114-Status: GOOD ( 24.51 ) 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 Thu, 27 May 2021 18:37:37 +0100, Catalin Marinas wrote: > > 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. Yeah, that should be possible with some minor refactoring of the generic and x86 code, allowing us to get rid of the double arch callback circus. It would also make the locking a bit saner, but also change it for all the callers... I'll have a play with it. > But if it's not possible or you want to stick to this approach, fine > by me: > > Reviewed-by: Catalin Marinas Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ 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: 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.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 A50FBC47087 for ; Fri, 28 May 2021 09:06:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82DC6613DA for ; Fri, 28 May 2021 09:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236416AbhE1JHq (ORCPT ); Fri, 28 May 2021 05:07:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:59048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236542AbhE1JHZ (ORCPT ); Fri, 28 May 2021 05:07:25 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E85F6127A; Fri, 28 May 2021 09:05:51 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lmYRB-0046mf-4c; Fri, 28 May 2021 10:05:49 +0100 Date: Fri, 28 May 2021 10:05:47 +0100 Message-ID: <87zgwf1b4k.wl-maz@kernel.org> From: Marc Zyngier To: Catalin Marinas 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() In-Reply-To: <20210527173736.GG8661@arm.com> References: <20210526190531.62751-1-maz@kernel.org> <20210526190531.62751-5-maz@kernel.org> <20210527173736.GG8661@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: catalin.marinas@arm.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, ardb@kernel.org, mark.rutland@arm.com, james.morse@arm.com, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, ebiederm@xmission.com, bhupesh.sharma@linaro.org, takahiro.akashi@linaro.org, dyoung@redhat.com, mdf@kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 May 2021 18:37:37 +0100, Catalin Marinas wrote: > > 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. Yeah, that should be possible with some minor refactoring of the generic and x86 code, allowing us to get rid of the double arch callback circus. It would also make the locking a bit saner, but also change it for all the callers... I'll have a play with it. > But if it's not possible or you want to stick to this approach, fine > by me: > > Reviewed-by: Catalin Marinas Thanks, M. -- Without deviation from the norm, progress is not possible.