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=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 EC0BBC4708F 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 CB42E610A8 for ; Tue, 1 Jun 2021 08:36:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233272AbhFAIiO (ORCPT ); Tue, 1 Jun 2021 04:38:14 -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: linux-kernel@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. 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 E8D8FC47080 for ; Tue, 1 Jun 2021 08:37:55 +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 AA34861263 for ; Tue, 1 Jun 2021 08:37:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA34861263 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=pZIM2O+hsRNGiGDydb7jOBPjMob8GwQQFr55j+XtKrc=; b=KjCVF6Q4V5+R2N kyCI7soCeDaGO+Kfb2f7FSOYzgYZ6NVluQniyc+PbJkiutYz9jkty+v4lIlvG9C2uPM2jU6uK1PHh jwSZoB1sHRUzjuGILK/G94LCQ37TzH9CRv7dqcFNBQVKPw7XHqlKb3j7Gh1fSbGxfO50FFxeO6bZv A0sEYo1dqxzWGk6Xqf7PbmvA9EN+h7uVqx67etjyg/f6JYwQdyhg6+27Xqv28UUG1PziE/AMWFhm/ DvC9K/8xF8NGUCx6mNFNCwIrL1yP7WH0+siyyWDEUUla7dvvFYj3Anf5RxXDvI4Ftal7KSEGaxB7o a8gHzNu+KwXj9G3MckDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnzt7-00FN55-4A; Tue, 01 Jun 2021 08:36:37 +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 1lnzt2-00FN3O-0A; Tue, 01 Jun 2021 08:36:33 +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 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") 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210601_013632_093071_9FD842FB X-CRM114-Status: GOOD ( 22.93 ) 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 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. _______________________________________________ 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: Tue, 01 Jun 2021 09:36:27 +0100 Message-ID: <87y2bu0yno.wl-maz@kernel.org> From: Marc Zyngier 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> 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: 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" 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. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec