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 15A99C47080 for ; Tue, 1 Jun 2021 08:36:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1C826108D for ; Tue, 1 Jun 2021 08:36:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233182AbhFAIiN (ORCPT ); Tue, 1 Jun 2021 04:38:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:38744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbhFAIiM (ORCPT ); Tue, 1 Jun 2021 04:38:12 -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 B425761263; Tue, 1 Jun 2021 08:36:31 +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 1lnzsz-004lms-I8; Tue, 01 Jun 2021 09:36:29 +0100 Date: Tue, 01 Jun 2021 09:36:27 +0100 Message-ID: <87y2bu0yno.wl-maz@kernel.org> From: Marc Zyngier To: Ard Biesheuvel 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 , "# 3.4.x" Subject: Re: [PATCH v2 1/5] arm64: kexec_file: Forbid non-crash kernels In-Reply-To: References: <20210531095720.77469-1-maz@kernel.org> <20210531095720.77469-2-maz@kernel.org> 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: ardb@kernel.org, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@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, akpm@linux-foundation.org, mdf@kernel.org, kernel-team@android.com, stable@vger.kernel.org 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: stable@vger.kernel.org On Mon, 31 May 2021 20:37:49 +0100, Ard Biesheuvel wrote: > > On Mon, 31 May 2021 at 11:57, Marc Zyngier wrote: > > > > It has been reported that kexec_file doesn't really work on arm64. > > It completely ignores any of the existing reservations, which results > > in the secondary kernel being loaded where the GICv3 LPI tables live, > > or even corrupting the ACPI tables. > > > > Since only crash kernels are imune to this as they use a reserved > > memory region, disable the non-crash kernel use case. Further > > patches will try and restore the functionality. > > > > Reported-by: Moritz Fischer > > Signed-off-by: Marc Zyngier > > Cc: stable@vger.kernel.org # 5.10 > > Acked-by: Ard Biesheuvel > > ... but do we really only need this in 5.10 and not earlier? We *do* need something in earlier kernel (as mentioned in the cover letter), but not this patch (arch_kexec_locate_mem_hole doesn't exist there, so there is nothing to override). I guess that completely disabling CONFIG_KEXEC_FILE on arm64 is the way to go for 5.4 and earlier, as I don't think there is any crash kernel support there. Thanks, M. -- Without deviation from the norm, progress is not possible.