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.